query timeout because of one always valid primary key condition in select mysql
I have a 40M record table having id as the primary key. I execute a select statement as follows: select * from messages where (some condition) order by id desc limit 20; It is ok and the query executes in…