Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group