List:General Discussion« Previous MessageNext Message »
From:Jay J Date:December 9 1999 7:12pm
Subject:Re: DBI Performance with Multiple IDs
View as plain text  
----- Original Message -----
From: <srfrog@stripped>
To: "Alex Menendez" <amen@stripped>
Cc: <modperl@stripped>; <mysql@stripped>
Sent: Thursday, December 09, 1999 12:51 PM
Subject: Re: DBI Performance with Multiple IDs


> On Thu, 9 Dec 1999, Alex Menendez wrote:
[snip]
> > -Or is it faster to  prepare the statement each time the script is
> > called with the following sql statement and execute once:
> > $sth = $dbh->prepare('SELECT name FROM table_name WHERE id IN
> > (1,2,3,4,5,6....)';
> > $sth->execute;
> >
>
> I would definately say this last one. but you're limited to 256
> items. and to save you some time, also consider nesting INSERT (or
> REPLACE) with something like this:
[snip]

I'm not aware of such a limit when using the IN() function. (I believe
someone asked about a IN()'s limit recently). Are you thinking of ENUM or
SET type?

-Jay J
------------------------------------------------
ENUM('value1','value2',...)
An enumeration. A string object that can have only one value, chosen from
the list of values 'value1', 'value2', ..., or NULL. An ENUM can have a
maximum of 65535 distinct values.
SET('value1','value2',...)
A set. A string object that can have zero or more values, each of which must
be chosen from the list of values 'value1', 'value2', ... A SET can have a
maximum of 64 members.

Thread
DBI Performance with Multiple IDsAlex Menendez9 Dec
  • Re: DBI Performance with Multiple IDssrfrog9 Dec
    • Re: DBI Performance with Multiple IDsJay J9 Dec
      • Re: DBI Performance with Multiple IDssrfrog9 Dec