[Keystone Slip # 19] NOT IN clause performs badly
| От | webmaster@postgresql.org |
|---|---|
| Тема | [Keystone Slip # 19] NOT IN clause performs badly |
| Дата | |
| Msg-id | 199907261646.MAA11778@hub.org обсуждение исходный текст |
| Список | pgsql-bugs |
---------------------------------------------------------------------------
Slip number -----: 19
Problem ---------: NOT IN clause performs badly
Opened by -------: Christian.Rudow@thinx.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.
---------------------------------------------------------------------------
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
В списке pgsql-bugs по дате отправления: