Answer the question
In order to leave comments, you need to log in
How to get disk merge statistics in PostgreSQL?
It would be necessary to find out how often disk merge occurs, to pull out statistics on indexes, for example, you can do this:
SELECT
relname,
100 * idx_scan / (seq_scan + idx_scan) percent_of_times_index_used,
n_live_tup rows_in_table
FROM
pg_stat_user_tables
WHERE
seq_scan + idx_scan > 0
ORDER BY
n_live_tup DESC;
Answer the question
In order to leave comments, you need to log in
uh, what do you mean by disk merge?
offhand... turn on track_io_timing and see pg_statio_user_tables, pg_statio_user_indexes views (blks_read/blks_hit fields).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question