I have a scenario where I need to check for 10,000 different specific names against a table with about 60,000 records of names. Assuming caching is not relevant, generally speaking, for performance purposes, is it better to:
(1) Break up into mini-queries so that there are maybe 200 different names per query?
or
(2) Write one mongocious sql statement with 10,000 “OR” clauses?
You missed out number 3: Do it another way entirely:
I would write the list to a separate table/temp table or something, then filter using a
join/existsor whatever.