I need to select multiple records
I use
SELECT *
FROM `table`
WHERE `ID` =5623
OR `ID` =5625
OR `ID` =5628
OR `ID` =5621
this
On top of what the people stated (where id in):
1) iF there are a lot of IDs, better to stick them into a temp table and run a join with that temp table
2) Make sure your table has an index on id
3) If the real-timeliness of the data is not critical, put the query results in a cache on the application side