Re: Whats the limit on the number of elements in the IN clause of SELECT/UPDATE/DELETE

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Gourish Singbal <gourish(at)gmail(dot)com>
Cc: PgSQL Admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Whats the limit on the number of elements in the IN clause of SELECT/UPDATE/DELETE
Date: 2005-03-22 17:50:56
Message-ID: 20050322175056.GA12999@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Mar 22, 2005 at 21:52:35 +0530,
Gourish Singbal <gourish(at)gmail(dot)com> wrote:
> Can some one give me the details for the below question?.
>
> Whats the limit on the number of elements in the IN clause of
> SELECT/UPDATE/DELETE?.

I believe I have seen reports of people using thousands. However, since
this case is converted to OR, it won't be particular fast when you have
a number of values. In that case you are going to be better off loading
them into a temp table, analyzing the table and then using IN with a
subselect (and you want to be using 7.4 or later).

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2005-03-22 18:06:23 Re: Adding field to a table currently being used
Previous Message Jada Case 2005-03-22 17:41:22 Adding field to a table currently being used