No stats visible?

Started by Steve Laneabout 23 years ago3 messagesgeneral
Jump to latest
#1Steve Lane
slane@moyergroup.com

Hello all:

I've been looking at Postgres' statistics tables to try to get some sense of
why my database server seems to be running slowly. Oddly, the stats tables
seem to be recording no activity! pg_stat_get_tuples_inserted on one of my
main tables says no tuples have been inserted. I also get lots of zeroes for
all the main numbers on most of the other tables.

The server does get restarted daily but there's definitely been activity
today. Stats logging should be working because I have not changed this in
postgresql.conf and in case I can see the stats-related instances of
postmaster when I look at current processes.

Any ideas?

-- sgl

=======================================================
Steve Lane

Vice President
The Moyer Group
14 North Peoria St Suite 2H

Voice: (312) 433-2421 Email: slane@moyergroup.com
Fax: (312) 850-3930 Web: http://www.moyergroup.com
=======================================================

#2Doug McNaught
doug@mcnaught.org
In reply to: Steve Lane (#1)
Re: No stats visible?

Steve Lane <slane@moyergroup.com> writes:

Hello all:

I've been looking at Postgres' statistics tables to try to get some sense of
why my database server seems to be running slowly. Oddly, the stats tables
seem to be recording no activity! pg_stat_get_tuples_inserted on one of my
main tables says no tuples have been inserted. I also get lots of zeroes for
all the main numbers on most of the other tables.

Are you running ANALYZE regularly? Are you VACUUMing?

-Doug

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Steve Lane (#1)
Re: No stats visible?

Steve Lane <slane@moyergroup.com> writes:

I've been looking at Postgres' statistics tables to try to get some sense of
why my database server seems to be running slowly. Oddly, the stats tables
seem to be recording no activity!

Did you enable stats collection?
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/monitoring-stats.html#MONITORING-STATS-SETUP

regards, tom lane