Обсуждение: pg_stat_user_tables

Поиск
Список
Период
Сортировка

pg_stat_user_tables

От
Medi Montaseri
Дата:
How come I don't see any activities from pg_stat_user_tables

pg=> select relid, n_tup_ins, n_tup_upd, n_tup_del from pg_stat_user_tables;

 relid | n_tup_ins | n_tup_upd | n_tup_del
-------+-----------+-----------+-----------
 16557 |         0 |         0 |         0
 16562 |         0 |         0 |         0
 16567 |         0 |         0 |         0
 16573 |         0 |         0 |         0
 16578 |         0 |         0 |         0
 16583 |         0 |         0 |         0
 16588 |         0 |         0 |         0
 16594 |         0 |         0 |         0
 16600 |         0 |         0 |         0
 16606 |         0 |         0 |         0
 16612 |         0 |         0 |         0
 16618 |         0 |         0 |         0
 16624 |         0 |         0 |         0
 16630 |         0 |         0 |         0
 16636 |         0 |         0 |         0
 16642 |         0 |         0 |         0
 16647 |         0 |         0 |         0
 16652 |         0 |         0 |         0
 16657 |         0 |         0 |         0
 16663 |         0 |         0 |         0
 16669 |         0 |         0 |         0
 16675 |         0 |         0 |         0
 16681 |         0 |         0 |         0
 16686 |         0 |         0 |         0
 16692 |         0 |         0 |         0
 16698 |         0 |         0 |         0
 16704 |         0 |         0 |         0
 16709 |         0 |         0 |         0
 16715 |         0 |         0 |         0
 16721 |         0 |         0 |         0
 16727 |         0 |         0 |         0
 16733 |         0 |         0 |         0
 16739 |         0 |         0 |         0
 16745 |         0 |         0 |         0
 16750 |         0 |         0 |         0
 16756 |         0 |         0 |         0





Re: pg_stat_user_tables

От
Bruce Momjian
Дата:
You need to turn it on in postgresql.conf.

---------------------------------------------------------------------------

Medi Montaseri wrote:
> How come I don't see any activities from pg_stat_user_tables
>
> pg=> select relid, n_tup_ins, n_tup_upd, n_tup_del from pg_stat_user_tables;
>
>  relid | n_tup_ins | n_tup_upd | n_tup_del
> -------+-----------+-----------+-----------
>  16557 |         0 |         0 |         0
>  16562 |         0 |         0 |         0
>  16567 |         0 |         0 |         0
>  16573 |         0 |         0 |         0
>  16578 |         0 |         0 |         0
>  16583 |         0 |         0 |         0
>  16588 |         0 |         0 |         0
>  16594 |         0 |         0 |         0
>  16600 |         0 |         0 |         0
>  16606 |         0 |         0 |         0
>  16612 |         0 |         0 |         0
>  16618 |         0 |         0 |         0
>  16624 |         0 |         0 |         0
>  16630 |         0 |         0 |         0
>  16636 |         0 |         0 |         0
>  16642 |         0 |         0 |         0
>  16647 |         0 |         0 |         0
>  16652 |         0 |         0 |         0
>  16657 |         0 |         0 |         0
>  16663 |         0 |         0 |         0
>  16669 |         0 |         0 |         0
>  16675 |         0 |         0 |         0
>  16681 |         0 |         0 |         0
>  16686 |         0 |         0 |         0
>  16692 |         0 |         0 |         0
>  16698 |         0 |         0 |         0
>  16704 |         0 |         0 |         0
>  16709 |         0 |         0 |         0
>  16715 |         0 |         0 |         0
>  16721 |         0 |         0 |         0
>  16727 |         0 |         0 |         0
>  16733 |         0 |         0 |         0
>  16739 |         0 |         0 |         0
>  16745 |         0 |         0 |         0
>  16750 |         0 |         0 |         0
>  16756 |         0 |         0 |         0
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: pg_stat_user_tables

От
Tom Lane
Дата:
Medi Montaseri <medi.montaseri@intransa.com> writes:
> How come I don't see any activities from pg_stat_user_tables

Probably because you haven't turned on collection of the statistics.

            regards, tom lane