How to find out tables that are frequently read/ write?

Поиск
Список
Период
Сортировка
От Jason W
Тема How to find out tables that are frequently read/ write?
Дата
Msg-id AG-HMnOW9RXr_yjrTJCG6NvC4f2wFBjVKTqD1MABpGvbdNb5tBPF10nHZW3BwDUmyrazaEBr1ypXTJJqVSU09DPSczDAPgB-_wf9sLIfopc=@protonmail.com
обсуждение исходный текст
Список pgsql-general
Apologize first because I am not familiar with database. So I probably did not find the right doc before posting my question.

I received a chart which is plotted by X - date, and Y - throughput (M/ sec). It shows that recently (after N Jan) the read/ write throughput was increased drastically.

So I lookup on the internet, finding doc like [1] points out that some pg_XXXXX tables, such as pg_stat_user_tables, looks like can be used to check such stats. For instance,

       SELECT schemaname, relname, idx_tup_fetch + seq_tup_read as total_read
          FROM pg_stat_user_tables
        WHERE idx_tup_fetch is not NULL and idx_tup_fetch + seq_tup_read != 0
    ORDER BY total_read desc
             LIMIT 10;

Is this a correct way to find tables frequently being read? If not what's a better way to achieve this? And how about write? Or any other docs that I should read as well?

I appreciate any suggestions, thanks.


 



В списке pgsql-general по дате отправления:

Предыдущее
От: Michel Pelletier
Дата:
Сообщение: Re: Implementing an expanded object in C
Следующее
От: Ricardo Martin Gomez
Дата:
Сообщение: Re: Connection issue