I have an authentication system for my programs which logs every authentication attempt.
Now over the months, the logs table have gotten 4,064,450 records.
The problem is when im executing that query to get the latest 13 records it takes about 10 seconds to do it.
"SELECT * FROM logs_table ORDER BY `time` DESC LIMIT 0, 13"
`time` = the time of the attempt.
Is there a way to optimize the query ?