pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedpostgresql.conf runtime statistics default
4+ messages / 2 participants
[nested] [flat]
* postgresql.conf runtime statistics default
@ 2005-06-09 10:08 Yann Michel <yann-postgresql@spline.de>
0 siblings, 1 reply; 4+ messages in thread
From: Yann Michel @ 2005-06-09 10:08 UTC (permalink / raw)
To: pgsql-performance
Hi,
after having migrated a 7.2 pg-database to 7.4 while upgrdaing from
debian woody to debian sarge there are some more conf-Parameters to
evaluate.
We are running a small but continuously growing datawarehouse which has
recently around 40 million fact entries.
To my question: I found the parameter "stats_reset_on_server_start"
which is set to true by default. Why did you choose this (and not false)
and what are the impacts of changeing it to false? I mean, as long as I
understood it, each query or statements generates some statistic data
which is used by the optimizer (or anything equal) later on. So in my
oppinion, wouldn't it be better so set this parameter to false and to
enable a kind of a "startup reset_stats" option?
Regards,
Yann
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: postgresql.conf runtime statistics default
@ 2005-06-09 13:11 Richard Huxton <dev@archonet.com>
parent: Yann Michel <yann-postgresql@spline.de>
0 siblings, 1 reply; 4+ messages in thread
From: Richard Huxton @ 2005-06-09 13:11 UTC (permalink / raw)
To: Yann Michel <yann-postgresql@spline.de>; +Cc: pgsql-performance
Yann Michel wrote:
>
> To my question: I found the parameter "stats_reset_on_server_start"
> which is set to true by default. Why did you choose this (and not false)
> and what are the impacts of changeing it to false? I mean, as long as I
> understood it, each query or statements generates some statistic data
> which is used by the optimizer (or anything equal) later on. So in my
> oppinion, wouldn't it be better so set this parameter to false and to
> enable a kind of a "startup reset_stats" option?
This is administrator statistics (e.g. number of disk blocks read from
this index) not planner statistics. You're right - it would be foolish
to throw away planner stats.
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: postgresql.conf runtime statistics default
@ 2005-06-10 04:57 Yann Michel <yann-postgresql@spline.de>
parent: Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 4+ messages in thread
From: Yann Michel @ 2005-06-10 04:57 UTC (permalink / raw)
To: Richard Huxton <dev@archonet.com>; +Cc: pgsql-performance
Hi,
On Thu, Jun 09, 2005 at 02:11:22PM +0100, Richard Huxton wrote:
> >
> >To my question: I found the parameter "stats_reset_on_server_start"
> >which is set to true by default. Why did you choose this (and not false)
> >and what are the impacts of changeing it to false? I mean, as long as I
> >understood it, each query or statements generates some statistic data
> >which is used by the optimizer (or anything equal) later on. So in my
> >oppinion, wouldn't it be better so set this parameter to false and to
> >enable a kind of a "startup reset_stats" option?
>
> This is administrator statistics (e.g. number of disk blocks read from
> this index) not planner statistics. You're right - it would be foolish
> to throw away planner stats.
So what is best to set this parameter to and when? As I read this
parameter is documented within the section "16.4.7.2. Query and Index
Statistics Collector" so I guess it is better to set it to false as
described above. Or am I wrong?
Regards,
Yann
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: postgresql.conf runtime statistics default
@ 2005-06-10 07:17 Richard Huxton <dev@archonet.com>
parent: Yann Michel <yann-postgresql@spline.de>
0 siblings, 0 replies; 4+ messages in thread
From: Richard Huxton @ 2005-06-10 07:17 UTC (permalink / raw)
To: Yann Michel <yann-postgresql@spline.de>; +Cc: pgsql-performance
Yann Michel wrote:
> Hi,
>
> On Thu, Jun 09, 2005 at 02:11:22PM +0100, Richard Huxton wrote:
>
>>>To my question: I found the parameter "stats_reset_on_server_start"
>>>which is set to true by default. Why did you choose this (and not false)
>>>and what are the impacts of changeing it to false? I mean, as long as I
>>>understood it, each query or statements generates some statistic data
>>>which is used by the optimizer (or anything equal) later on. So in my
>>>oppinion, wouldn't it be better so set this parameter to false and to
>>>enable a kind of a "startup reset_stats" option?
>>
>>This is administrator statistics (e.g. number of disk blocks read from
>>this index) not planner statistics. You're right - it would be foolish
>>to throw away planner stats.
>
>
> So what is best to set this parameter to and when? As I read this
> parameter is documented within the section "16.4.7.2. Query and Index
> Statistics Collector" so I guess it is better to set it to false as
> described above. Or am I wrong?
It depends on whether you want to know how much activity your
tables/indexes have received *ever* or since you last restarted. If you
altered your database schema, added/removed indexes or changed
hardware/configuration then you might want to reset the counts to zero
to more easily see the effect of the new setup.
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-06-10 07:17 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-09 10:08 postgresql.conf runtime statistics default Yann Michel <yann-postgresql@spline.de>
2005-06-09 13:11 ` Richard Huxton <dev@archonet.com>
2005-06-10 04:57 ` Yann Michel <yann-postgresql@spline.de>
2005-06-10 07:17 ` Richard Huxton <dev@archonet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox