Re: [PERFORM] Bad estimation for "where field not in"

2012-03-01 Thread Tom Lane
Ants Aasma writes: > On Thu, Mar 1, 2012 at 6:40 PM, Daniele Varrazzo > wrote: >> Is this a known planner shortcoming or something unexpected, to be >> escalated to -bugs? Server version is 9.0.1. > The relevant code is in scalararraysel() function. It makes the > assumption that element wise co

Re: [PERFORM] Bad estimation for "where field not in"

2012-03-01 Thread Ants Aasma
On Thu, Mar 1, 2012 at 6:40 PM, Daniele Varrazzo wrote: > Is this a known planner shortcoming or something unexpected, to be > escalated to -bugs? Server version is 9.0.1. The relevant code is in scalararraysel() function. It makes the assumption that element wise comparisons are completely indep

[PERFORM] Bad estimation for "where field not in"

2012-03-01 Thread Daniele Varrazzo
Hello, We have a table with about 60M records, almost all of which in one of two statuses ('done', 'failed') and a few of them, usually < 1000, in different transient statuses. We also have a partial index indexing the transient items: where status not in ('done', 'failed'). Stats are about right