Re: Cross-column statistics revisited - Mailing list pgsql-hackers

From Ron Mayer
Subject Re: Cross-column statistics revisited
Date
Msg-id 48F8CB2A.6010805@cheapcomplexdevices.com
Whole thread Raw
In response to Re: Cross-column statistics revisited  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> A bad estimate for physical-position correlation has only limited
> impact,

Ah!  This seems very true with 8.3 but much less true with 8.0.

On a legacy 8.0 system I have a hard time avoiding cases where
a query like "select * from addresses where add_state_or_province = 'CA';"
does a 2-second full-table scan instead of a 300ms index scan
thanks to a poor physical order guess.

I just sucked the table into 8.3 and am pleased to say that
it picks a 200ms bitmap scan even with the misleading correlation.

Thanks for bitmap scans guys!

I'll shut up about this physical ordering stuff now
and try to do better upgrading before posting.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Block-level CRC checks
Next
From: Tom Lane
Date:
Subject: Re: Improving planner variable handling