Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Very long "WHERE" list.

Re: Very long "WHERE" list.

From: Noons <wizofoz2k_at_yahoo.com.au.nospam>
Date: Sun, 11 Jul 2004 20:07:41 +1000
Message-ID: <40f11162$0$18191$afc38c87@news.optusnet.com.au>


Andy Hassall apparently said,on my timestamp of 10/07/2004 10:40 PM:

>
> A quick test shows that MySQL 4.0.18 can.
>
> #!/usr/bin/perl
> my $monstroInlist = join ',', (1..20000);
> print <<END_SQL;
> select count(*)
> from t
> where id in ($monstroInlist);
> END_SQL
>

Mind creating a linear list with all the values as proposed by the OP? I think you will find that it will exceed the max SQL statement size. What if the list had the third element missing after every dozen?

-- 
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Sun Jul 11 2004 - 05:07:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US