BUG #8274: Wildly insane boolean selectivity estimates
The following bug has been logged on the website:
Bug reference: 8274
Logged by: Andrew Gierth
Email address: andrew@tao11.riddles.org.uk
PostgreSQL version: 9.1.9
Operating system: any
Description:
The guy on IRC who ran into this one was using 9.1.9, but it seems to still
exist in master.
The handling of freq_null for estimating IS NOT TRUE/FALSE for boolean
columns which are all null or almost all null (enough that analyze doesn't
find any non-null values to put in MCV) is completely off in the weeds.
Suggested fix at:
https://gist.github.com/RhodiumToad/5901567
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
andrew@tao11.riddles.org.uk writes:
The handling of freq_null for estimating IS NOT TRUE/FALSE for boolean
columns which are all null or almost all null (enough that analyze doesn't
find any non-null values to put in MCV) is completely off in the weeds.
Doh, definitely a bit of brain fade there :-(
Suggested fix at:
https://gist.github.com/RhodiumToad/5901567
Seems reasonable, will fix.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs