Re: Any disadvantages of using =ANY(ARRAY()) instead of IN? - Mailing list pgsql-performance

From geirB
Subject Re: Any disadvantages of using =ANY(ARRAY()) instead of IN?
Date
Msg-id 45c0f1b5-ddbf-4307-9793-c51c1b8d6f80@e20g2000vbm.googlegroups.com
Whole thread Raw
In response to Any disadvantages of using =ANY(ARRAY()) instead of IN?  (Clemens Eisserer <linuxhippy@gmail.com>)
List pgsql-performance
Ah, forgot one query:
WHERE IN is of course fast when we supply id's directly, but not when
they are wrapped as array and UNNEST'ed in query 6. (previous post
from me)

-- Test 6b: Fast. WHERE IN(explicit id list)
SELECT * FROM (
       SELECT * FROM table1
       UNION
       SELECT * FROM table1
) Q WHERE id IN
(100001,100002,100003,100004,100005,100006,100007,100008,100009,10010);

--
Geir Bostad
9.1.3(x64,win)


pgsql-performance by date:

Previous
From: Stephen Frost
Date:
Subject: Re: High load average in 64-core server , no I/O wait and CPU is idle
Next
From: geirB
Date:
Subject: Re: Any disadvantages of using =ANY(ARRAY()) instead of IN?