From: Matthew T. O'Connor <matthew@zeut.net>
To: Gaetano Mendola <mendola@bigfoot.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dennis Bjorklund <db@zigo.dhs.org>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: [HACKERS] Wrong index choosen?
Date: Fri, 23 Jul 2004 14:12:09 -0400
Message-ID: <410154F9.3080500@zeut.net> (raw)
In-Reply-To: <41014DE1.8000007@bigfoot.com>
References: <Pine.LNX.4.44.0407231354520.9559-100000@zigo.dhs.org>
<20162.1090593927@sss.pgh.pa.us>
<41014DE1.8000007@bigfoot.com>
Gaetano Mendola wrote:
> Tom Lane wrote:
> | Given the nature of the data (login times), I'd imagine that the problem
> | is simply that he hasn't analyzed recently enough. A bump in stats
> | target may not be needed, but he's going to have to re-analyze that
> | column often if he wants this sort of query to be estimated accurately,
> | because the fraction of entries later than a given time T is *always*
> | going to be changing.
>
> Well know that I think about it, I felt my shoulders covered by
> pg_autovacuum but looking at the log I see that table never analyzed!
> Aaargh.
>
> I already applied the patch for the autovacuum but evidently I have to
> make it more aggressive, I'm sorry that I can not made him more aggressive
> only for this table.
Yeah, the version of autovacuum in 7.4 contrib doesn't allow table
specific settings. The patch I have sumbitted for 7.5 does, so
hopefully this will be better in the future.
You can however set the VACUUM and ANALYZE thresholds independently.
So perhpaps it will help you if you set your ANALYZE setting to be very
aggressive and your VACUUM settings to something more standard.
Matthew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: matthew@zeut.net, mendola@bigfoot.com, tgl@sss.pgh.pa.us, db@zigo.dhs.org
Subject: Re: [HACKERS] Wrong index choosen?
In-Reply-To: <410154F9.3080500@zeut.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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