Search Postgresql Archives

Re: Very slow queries w/ NOT IN preparation (seems like a bug, test case)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> 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/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux