Are there scalable ways to select thousands of rows using mysql IN or something similar?
eg.
SELECT * FROM awesomeTable WHERE id IN (1,2,3,4......100000)
Is this possible, or am I just dreaming? Schema - InnoDB, subject to change if another provides a more scalable solution.
For reference, I get search results from a set of identifiers returned from Solr. I would like to use mysql for the final search, as this would facilitate sorting and final filtering of these results (I will not go into details of the reasons).
EDIT:
The query may use the LIMIT clause while IN still contains all 100,000 identifiers
eg.
SELECT * FROM awesomeTable WHERE id IN (1,2,3,4......100000) LIMIT 10;
William king
source share