pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #8274: Wildly insane boolean selectivity estimates
2+ messages / 2 participants
[nested] [flat]

* BUG #8274: Wildly insane boolean selectivity estimates
@ 2013-07-01 15:00  andrew@tao11.riddles.org.uk
  0 siblings, 1 reply; 2+ messages in thread

From: andrew@tao11.riddles.org.uk @ 2013-07-01 15:00 UTC (permalink / raw)
  To: pgsql-bugs

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #8274: Wildly insane boolean selectivity estimates
@ 2013-07-24 04:22  Tom Lane <tgl@sss.pgh.pa.us>
  parent: andrew@tao11.riddles.org.uk
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2013-07-24 04:22 UTC (permalink / raw)
  To: andrew@tao11.riddles.org.uk; +Cc: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2013-07-24 04:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-07-01 15:00 BUG #8274: Wildly insane boolean selectivity estimates andrew@tao11.riddles.org.uk
2013-07-24 04:22 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox