Results 1 to 10 of 10
Mar 18, 2011, 17:23 #1
- Join Date
- Mar 2011
- 0 Post(s)
- 0 Thread(s)
Problem with query taking too long
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 ?