From: | "Sergey Konoplev" <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | "Richard Huxton" <dev(at)archonet(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case) |
Date: | 2008-11-11 12:02:13 |
Message-ID: | c3a7de1f0811110402m1d567b21ne9e699158cd366db@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
>
> Can you post the EXPLAIN ANALYSE output from your NOT IN query?
>
Seq Scan on table1 (cost=0.00..12648.25 rows=3351 width=0) (actual
time=0.054..140.596 rows=5000 loops=1)
Filter: (table1_id <> ALL ('{123456789000, ... plus 1999 ids'::bigint[]))
Total runtime: 142.303 ms
(3 rows)
But actual (real) time of running "EXPLAIN SELECT 1 FROM table1 WHERE
table1_id NOT IN > (...~2000 ids here...);" is
2000 ids: 34102 ms
--
Regards,
Sergey Konoplev
--
PostgreSQL articles in english & russian
http://gray-hemp.blogspot.com/search/label/postgresql/
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2008-11-11 12:45:19 | Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case) |
Previous Message | Sam Mason | 2008-11-11 11:54:11 | Re: Current log files when rotating? |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2008-11-11 12:06:10 | Re: [I|S]CONST/[I|S]const in gram.y |
Previous Message | Michael Meskes | 2008-11-11 12:01:57 | Re: gram.y=>preproc.y |