Re: [GENERAL] Inefficient plan selected by PostgreSQL 9.0.7

2012-05-01 Thread Maxim Boguk
On Wed, May 2, 2012 at 2:50 PM, Tom Lane wrote: > Maxim Boguk writes: > > I got very inefficient plan for a simple query. > > It looks like the problem is with the estimate of the antijoin size: > > > -> Nested Loop Anti Join (cost=0.00..24576.82 rows=1 > width=206) > > (actual time=0

Re: [GENERAL] Inefficient plan selected by PostgreSQL 9.0.7

2012-05-01 Thread Maxim Boguk
On Wed, May 2, 2012 at 2:50 PM, Tom Lane wrote: > Maxim Boguk writes: > > I got very inefficient plan for a simple query. > > It looks like the problem is with the estimate of the antijoin size: > > > -> Nested Loop Anti Join (cost=0.00..24576.82 rows=1 > width=206) > > (actual time=0

Re: [GENERAL] Inefficient plan selected by PostgreSQL 9.0.7

2012-05-01 Thread Tom Lane
Maxim Boguk writes: > I got very inefficient plan for a simple query. It looks like the problem is with the estimate of the antijoin size: > -> Nested Loop Anti Join (cost=0.00..24576.82 rows=1 width=206) > (actual time=0.043..436.386 rows=20761 loops=1) that is, only about 20% of th