From: | webmaster(at)postgresql(dot)org |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | [Keystone Slip # 19] NOT IN clause performs badly |
Date: | 1999-07-26 16:47:07 |
Message-ID: | 199907261647.MAA11811@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
---------------------------------------------------------------------------
Slip number -----: 19
Problem ---------: NOT IN clause performs badly
Opened by -------: Christian(dot)Rudow(at)thinx(dot)ch on 07/26/99 05:28
Assigned To -----: momjian
---------------------------------------------------------------------------
Summary:
table a (id integer
any number/type of other attributes)
unique index on id.
holding 10'000 rows
table b (id integer)
holding a subset of 8'000 rows, that
exist in table a.
trying to select all id values from table a
that do nor exist in table b :
select id from a
where id not in (select id from b);
this takes hours to process, while a simple join
select id from a,b
where a.id = b.id
returns within seconds
explain says : sequential scan on a and b.
still 120 minutes for processing can't be.
system used :
PG 6.4 on SusE 6.0, PII/300mhz.
---------------------------------------------------------------------------
History:
07/26/99 12:47 by scrappy:
Public setting changed to 1 from 0
---------------------------------------------------------------------------
Full information on this slip is available at:
http://www.postgresql.org/bugs/visitor.php3?sid=19&v_func=zoom
---------------------------------------------------------------------------
This message was generated automatically by Keystone at http://www.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | webmaster | 1999-07-26 16:47:51 | [Keystone Slip # 18] DROP USER causes core dump if user created a database |
Previous Message | webmaster | 1999-07-26 16:46:57 | [Keystone Slip # 19] NOT IN clause performs badly |