There are about a million entries in the table.
You can make several queries to select rows using WHERE by index:
WHERE type = ... , idUser = ..., idTouser = ... ORDER BY id DESC LIMIT 20WHERE ID IN(1,2,3,4,5...)WHERE type = ... , idUser = ..., idTouser = ...AND time > last_time_selected ORDER BY id DESC LIMIT 20
What will be optimal and under what conditions? Where can I get information?