Re: possible bug in 8.4 - Mailing list pgsql-hackers

From Grzegorz Jaskiewicz
Subject Re: possible bug in 8.4
Date
Msg-id 24C7D056-28F5-406A-A58B-DC0F0BF4B538@pointblue.com.pl
Whole thread Raw
In response to Re: possible bug in 8.4  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: possible bug in 8.4
Re: possible bug in 8.4
List pgsql-hackers
true, but as soon as I drop indices on both tables:

root=# explain analyze select a.a from a where a not in (select a from  
b);                                                     QUERY PLAN

-----------------------------------------------------------------------------------------------------------------------
Seq Scan on a  (cost=88677.00..187207.00 rows=3000000 width=4)
(actual time=22803.470..26473.039 rows=600000 loops=1)  Filter: (NOT (hashed subplan))  SubPlan    ->  Seq Scan on b
(cost=0.00..75177.00rows=5400000 width=4)
 
(actual time=9.232..15828.904 rows=5400000 loops=1)
Total runtime: 29357.267 ms
(5 rows)

root=# select version();                                               version
--------------------------------------------------------------------------------------------------------
PostgreSQL 8.3.5 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC)
3.4.6 20060404 (Red Hat 3.4.6-10)
(1 row)


I thought planner should be able to choose plan that costs less.



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Hot standby and b-tree killed items
Next
From: Heikki Linnakangas
Date:
Subject: Re: Hot standby and b-tree killed items