Re: [HACKERS] Wrong index choosen?

From: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [HACKERS] Wrong index choosen?
Date: 2004-07-23 18:12:09
Message-ID: 410154F9.3080500@zeut.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-07-23 18:45:36 Re: patch for allowing multiple -t options to pg_dump
Previous Message Gaetano Mendola 2004-07-23 17:41:53 Re: [HACKERS] Wrong index choosen?

Browse pgsql-performance by date

  From Date Subject
Next Message martin.bokler 2004-07-23 21:28:15 variable length - user defined types/storage place
Previous Message Gaetano Mendola 2004-07-23 17:41:53 Re: [HACKERS] Wrong index choosen?