MySQL Forums
Forum List  »  Newbie

Maximum Size of Where Clause
Posted by: Nathan Ziarek
Date: July 25, 2005 08:55AM

I am not sure if "clause" is the correct terminology.

I am receiving a list of numbers from an external, non-mySQL source that I need to use in a query. The string will range from just a few numbers to perhaps a hundred thousand.

What I need to do is query the database for each one of these images to get some information back.

I tried looping through each one, but at 500 queries, the slowdown was noticeable. Not bad, but noticeable. My next guess was to turn the images into a long WHERE clause. It worked, and it worked pretty fast. But, as I said, there are only about 500 images at this point. What happens when I get to 50,000 OR's in my WHERE clause? Will it still work? Will it be fast? Is there a limit to the number or characters in a WHERE clause?


Any suggestions, or this not a bad route (sure feels icky :-)

Nate

Options: ReplyQuote


Subject
Written By
Posted
Maximum Size of Where Clause
July 25, 2005 08:55AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.