Re: There is a statistic table?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: There is a statistic table?
Дата
Msg-id dcc563d10910152127l40057b5at910cad4dc7a4ff42@mail.gmail.com
обсуждение исходный текст
Ответ на There is a statistic table?  ("waldomiro" <waldomiro@shx.com.br>)
Список pgsql-performance
On Thu, Oct 15, 2009 at 9:33 PM, waldomiro <waldomiro@shx.com.br> wrote:
> Helo everbody!
>
> I need to know how much the postgres is going to disk to get blocks and how much it is going to cache? witch is the
statistictable and what is the field that indicates blocks reads from the disk and the memory cache? 

Yep.  Use psql to access postgres:

psql dbnamehere
\d pg_stat<tab><tab>

and you should get a list like:

pg_stat_activity              pg_statio_all_indexes
pg_statio_sys_tables          pg_statistic_relid_att_index
pg_stat_user_tables
pg_stat_all_indexes           pg_statio_all_sequences
pg_statio_user_indexes        pg_stats
pg_stat_all_tables            pg_statio_all_tables
pg_statio_user_sequences      pg_stat_sys_indexes
pg_stat_bgwriter              pg_statio_sys_indexes
pg_statio_user_tables         pg_stat_sys_tables
pg_stat_database              pg_statio_sys_sequences
pg_statistic                  pg_stat_user_indexes

just select * from them and you can get an idea what is stored.
Interesting ones right off the bat are:

pg_stat_user_tables
pg_stat_user_indexes
pg_stat_all_tables
pg_stat_all_indexes

but feel free to look around.

> Another question is, what is the best memory configuration to keep more data in cache?

OS or pgsql cache?  It's generally better to let the OS do the
majority of caching unless you are sure you can pin shared_buffers in
memory, since allocating too much to shared_buffers may result in
unused portions getting swapped out by some OSes which have aggressive
swapping behaviour.  Set shared_buggers to 2G or 1/4 of memory
whichever is smaller to start with, then monitor and adjust from
there.

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

Предыдущее
От: "waldomiro"
Дата:
Сообщение: There is a statistic table?
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: There is a statistic table?