설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은


Powered by EnterpriseDB
총 게시물 53건, 최근 0 건
   

DBA_SQL#4. 테이블과 인덱스 I/O 살펴보는 쿼리

글쓴이 : power 날짜 : 2014-12-19 (금) 20:25 조회 : 927

SELECT relname,cast(heap_blks_hit as numeric) / (heap_blks_hit + heap_blks_read) AS hit_pct,heap_blks_hit,heap_blks_read FROM pg_statio_user_tables
WHERE (heap_blks_hit + heap_blks_read)>0 ORDER BY hit_pct;


SELECT indexrelname,cast(idx_blks_hit as numeric) / (idx_blks_hit + idx_blks_read) AS hit_pct,idx_blks_hit,idx_blks_read FROM pg_statio_user_indexes WHERE (idx_blks_hit + idx_blks_read)>0 ORDER BY hit_pct;


   

postgresdba.com