Re: performance of IN (subquery) - Mailing list pgsql-general

From Tom Lane
Subject Re: performance of IN (subquery)
Date
Msg-id 10223.1093615059@sss.pgh.pa.us
Whole thread Raw
In response to Re: performance of IN (subquery)  (Jon Lapham <lapham@jandr.org>)
List pgsql-general
Jon Lapham <lapham@jandr.org> writes:
> Tom Lane wrote:
>> I've thought about this before.  One simple trick would be to get rid
>> of the current pg_class reltuples/relpages fields in favor of a
>> tuples-per-page estimate, which could be multiplied by
>> RelationGetNumberOfBlocks() during planning.

> My first reaction is to wonder if this would give performance exactly
> equal to running a true ANALYZE in every situation?

No, this is quite orthogonal to ANALYZE (and several orders of magnitude
cheaper...)  It would fix a lot of the simpler cases, though, since the
first-order effects like table size would be right.

            regards, tom lane

pgsql-general by date:

Previous
From: Paul Tillotson
Date:
Subject: Re: performance of IN (subquery)
Next
From: Tom Lane
Date:
Subject: Re: performance of IN (subquery)