seq_scan Alanı
Örnek
Açıklaması şöyle
Suppose you had a database with many indexes and wanted to monitor how well they were being used. You can use the number of times the index scan is against sequential scan pg_stat_statements
Şöyle yaparız
SELECT indexrelname, idx_scan, seq_scanFROM pg_stat_all_indexes ORDER BY (idx_scan + seq_scan) DESC LIMIT 10;
idx_scan Alanı
Örnek
Kullanılmayan indeksleri bulmak için şöyle yaparızSELECTrelname,indexrelname,idx_scan,idx_tup_read,idx_tup_fetch,pg_size_pretty(pg_relation_size(indexrelname::regclass)) as sizeFROMpg_stat_all_indexesWHEREschemaname = 'public'and indexrelname not like 'pg_toast_%'and idx_scan = 0and idx_tup_read = 0and idx_tup_fetch = 0and indexrelname != 'SequelizeData_pkey'ORDER BYpg_relation_size(indexrelname::regclass) desc;
Hiç yorum yok:
Yorum Gönder