Re: Any disadvantages of using =ANY(ARRAY()) instead of IN?

From: geirB <geir(dot)bostad(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Any disadvantages of using =ANY(ARRAY()) instead of IN?
Date: 2012-05-23 12:23:01
Message-ID: 45c0f1b5-ddbf-4307-9793-c51c1b8d6f80@e20g2000vbm.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Rajesh Kumar. Mallah 2012-05-24 03:39:09 High load average in 64-core server , no I/O wait and CPU is idle
Previous Message geirB 2012-05-23 12:07:04 Re: Any disadvantages of using =ANY(ARRAY()) instead of IN?