Re: Single table forcing sequential scans on query plans

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Cristian Gafton <gafton(at)rpath(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Single table forcing sequential scans on query plans
Date: 2008-03-17 13:37:43
Message-ID: 20080317133743.GG6083@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> Another possibility (though not a back-patchable solution) is that
> we could just dispense with the heuristic size estimate and trust a
> zero-sized table to stay zero-sized. This would be relying on the
> assumption that autovacuum will kick in and update the stats, leading
> to invalidation of any existing plans that assume the table is small.
> I don't feel very comfortable about that though --- throwing a few
> hundred tuples into a table might not be enough to draw autovacuum's
> attention, but it could surely be enough to create a performance
> disaster for nestloop plans.

FWIW autovacuum fires an analyze with the 51st tuple inserted on a
table on 8.3's default configuration.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-03-17 13:41:30 Re: [0/4] Proposal of SE-PostgreSQL patches
Previous Message Alvaro Herrera 2008-03-17 13:34:16 Re: [COMMITTERS] pgsql: Some cleanups of enum-guc code, per comments from Tom.