Re: [PERFORM] Trouble managing planner for timestamptz columns

2006-03-10 Thread Tom Lane
"Marc Morin" <[EMAIL PROTECTED]> writes: > Well this analyze just took 12 minutes... Stats target of 100. > # time psql xxx xxx -c "analyze elem_trafficstats_1" Try analyzing just the one column, and try reducing its stats target to 10. It does make a difference: sorttest=# set default_statisti

Re: [PERFORM] Trouble managing planner for timestamptz columns

2006-03-10 Thread Marc Morin
ailto:[EMAIL PROTECTED] > Sent: Friday, March 10, 2006 1:31 PM > To: Marc Morin > Cc: pgsql-performance@postgresql.org > Subject: Re: [PERFORM] Trouble managing planner for > timestamptz columns > > "Marc Morin" <[EMAIL PROTECTED]> writes: > > We tend

Re: [PERFORM] Trouble managing planner for timestamptz columns

2006-03-10 Thread Tom Lane
"Marc Morin" <[EMAIL PROTECTED]> writes: > We tend to analyze these tables every day or so and this doesn't always > prove to be sufficient Seems to me you just stated your problem. Instead of having the planner make wild extrapolations, why not set up a cron job to analyze these tables more

[PERFORM] Trouble managing planner for timestamptz columns

2006-03-10 Thread Marc Morin
We have large tables that hold statistics based on time. They are of the form. CREATE TABLE stats ( id serial primary key, logtime timestamptz, d1 int, s1 bigint ); CREATE INDEX idx on stats(logtime); Some of these tables have new data inserted at a rate of 500,000+ rows / hour