Re: possible bug in 8.4

From: Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Gregory Stark" <stark(at)enterprisedb(dot)com>, "PostgreSQL-development Hackers" <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: possible bug in 8.4
Date: 2008-12-19 09:57:42
Message-ID: 24C7D056-28F5-406A-A58B-DC0F0BF4B538@pointblue.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.00 rows=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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-12-19 10:24:52 Re: Hot standby and b-tree killed items
Previous Message Simon Riggs 2008-12-19 09:38:44 Re: Hot standby and b-tree killed items