generating statistics

Started by vinita bansalabout 21 years ago4 messagesgeneral
Jump to latest
#1vinita bansal
sagivini@hotmail.com

Hi,

I have set the following variables in postgresql.conf to true:
stats_start_collector,stats_command_string, stats_row_level,
stats_reset_on_server_start.

I am trying to get a list of all used indices and referenced tables in the
database for a particular run. According to the doc. the following tables
should contain this information: pg_stat_user_indexes, pg_stat_all_tables.
But, these tables are not getting populated. Do I need to set something else
to be able to get this information??

Regards,
Vinita Bansal

_________________________________________________________________
Get headhunted by 5000 tech recruiters.
http://www.naukri.com/tieups/tieups.php?othersrcp=736 Post your CV on
naukri.com.

#2Michael Fuhr
mike@fuhr.org
In reply to: vinita bansal (#1)
Re: generating statistics

On Wed, Mar 16, 2005 at 02:08:49PM +0000, vinita bansal wrote:

I have set the following variables in postgresql.conf to true:
stats_start_collector,stats_command_string, stats_row_level,
stats_reset_on_server_start.

Did you uncomment the settings in addition to setting them to true?

I am trying to get a list of all used indices and referenced tables in the
database for a particular run. According to the doc. the following tables
should contain this information: pg_stat_user_indexes, pg_stat_all_tables.
But, these tables are not getting populated.

Did you restart the database after making the configuration changes?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: vinita bansal (#1)
Re: generating statistics

"vinita bansal" <sagivini@hotmail.com> writes:

I have set the following variables in postgresql.conf to true:
stats_start_collector,stats_command_string, stats_row_level,
stats_reset_on_server_start.

Is the statistics collector actually starting? Look in "ps auxww"
output to see if the postmaster has a pair of child processes that claim
to be the stats collector and stats buffer processes.

If not, the postmaster log should have some info about the problem.

regards, tom lane

#4Michael Fuhr
mike@fuhr.org
In reply to: Michael Fuhr (#2)
Re: generating statistics

On Wed, Mar 16, 2005 at 06:27:43PM +0000, vinita bansal wrote:

Did you uncomment the settings in addition to setting them to true?
Did you restart the database after making the configuration changes?

Yes, I did.
FYI- I am using Postgres 8

Have you used SHOW to verify that the variables are indeed set? As
Tom Lane suggested, if you're on a *nix system, did you use "ps"
to see if the stats buffer process and stats collector process are
running? (I'm not sure how to check that if you're on Windows.)
Have you looked for errors in the postmaster logs?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/