Re: [SQL] New Optimizer Behaviour In 7.0b1 - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] New Optimizer Behaviour In 7.0b1
Date
Msg-id 15360.951606889@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] New Optimizer Behaviour In 7.0b1  (Mark Kirkwood <markir@ihug.co.nz>)
List pgsql-sql
Mark Kirkwood <markir@ihug.co.nz> writes:
> It looks like the estimate on the big table ( fact1 ) are right order of
> magnitude, but the small table ( dim0 ) ones are too high (and presumably )
> throwing the rest off

At least part of the problem is that the selectivity code doesn't know
how to deal with date/time datatypes :-(.  I was waiting for Thomas to
commit the great date/time reorganization before I wrote that code.
But he's done now, so I've gone in and fixed convert_to_scalar to know
about all the surviving date/time types.

If you like, you can pick up the updated version of 
src/backend/utils/adt/selfuncs.c from the CVS server, or grab a
snapshot tarball dated later than this message, and see whether
the selectivity estimates get any better.
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] text -> char
Next
From: mpg4@duluoz.net
Date:
Subject: Nested BEGIN...COMMIT transactions