Advertisement
Anatolyukropov

Look at Index

Mar 11th, 2023
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. select correlation from pg_stats where tablename = 'empCodeToPosition' and attname = 'positionId';
  2.  
  3. CREATE EXTENSION IF NOT EXISTS pageinspect;
  4. SELECT bt.ctid as corr_heap_ctid, e."positionId", e."empCodeId" FROM bt_page_items('"empCodeToPosition_empCodeId_idx"', 21) as bt INNER JOIN "empCodeToPosition" e on e.ctid = bt.ctid LIMIT 100 OFFSET 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement