The stupid question is the question not asked | |
PerlMonks |
Re: Re: Use Placeholders. For SECURITY and (sometimes) for PERFORMANCEby mpeppler (Vicar) |
on Nov 16, 2003 at 16:37 UTC ( [id://307474]=note: print w/replies, xml ) | Need Help?? |
That might work reasonably well for a fairly limited number of arguments. If your @values array is large (500+, say), then hitting the database 500 times may be faster than having a query with 500 ORs in the WHERE clause, because the optmizer is going to have a hell of a time trying to figure out the best access path, and because there may be a limit to the number of placeholders that a single statement can have (AFAIK for Sybase this limit is 256, btw). Michael
In Section
Meditations
|
|