J
J
jj_killer2014-03-24 21:51:46
PostgreSQL
jj_killer, 2014-03-24 21:51:46

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;

Is it possible to extract similar data about disk merge?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Lesovsky, 2014-04-16
@lesovsky

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 question

Ask a Question

731 491 924 answers to any question