Обсуждение: generating statistics

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

generating statistics

От
"vinita bansal"
Дата:
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.


Re: generating statistics

От
Michael Fuhr
Дата:
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/

Re: generating statistics

От
Tom Lane
Дата:
"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

Re: generating statistics

От
Michael Fuhr
Дата:
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/