From: markus brosch <brosch@gmx.de>
To: mallah@trade-india.com
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: max length of sql select statement ?
Date: 07 Jul 2003 18:20:20 +0200
Message-ID: <1057594820.881.115.camel@sam> (raw)
In-Reply-To: <1134.219.65.226.199.1057594425.squirrel@mail.trade-india.com>
References: <1057592658.881.93.camel@sam>
<1101.219.65.226.199.1057593454.squirrel@mail.trade-india.com>
<1057594050.886.104.camel@sam>
<1134.219.65.226.199.1057594425.squirrel@mail.trade-india.com>
On Mon, 2003-07-07 at 18:13, mallah@trade-india.com wrote:
> Well i DO NOT know the exact limit.
> May be someone else can answer it accurately.
>
> But you could produce the list within IN using a subselect
> that again depends on the exact problem.
>
Maybe anybody knows how many?
Anyway: My exact problem is "in words" quite easy:
col1 | col2
------------
123 | 958
143 | 394
124 | 345
324 | 345
346 | 541
743 | 144
346 | 986
Imagine, this table is really big (millions records).
Now, I want to retrieve for all records in col A OR col B where either
123, 124, 144, 541 (and a view thousands more ...) fits.
As far as I understud you:
SELECT * FROM table
WHERE col1 IN (123,124,144,541,...)
OR col2 IN (123,124,144,541,...);
Cheers, Markus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: brosch@gmx.de, mallah@trade-india.com
Subject: Re: max length of sql select statement ?
In-Reply-To: <1057594820.881.115.camel@sam>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox