We have a MySQL database with a large table(30000000 rows) where the banner are. We have a query such as:
SELECT * FROM banner WHERE banner.id IN (1,3,8...N);
The problem is that number in IN is large which result in slow query.
I want separate the number into groups to query, e.g. 1000 each group
Is this a good method? or other optimization?