How to speed up a query?

Posted by Soroush Khosravi on Stack Overflow See other posts from Stack Overflow or by Soroush Khosravi
Published on 2012-10-21T10:36:33Z Indexed on 2012/10/21 11:00 UTC
Read the original article Hit count: 103

Filed under:
|

I have a table that every request to the server, stores on it.
For each request I will check that it is banned or not.
For example it is a query:

select * from requests where request_sessID = '4bc0331d983000902b4718c80f12e9b3' AND request_time > (UNIX_TIMESTAMP() - 3600) AND request_isEnable = 1

I also set the engine from InnoDB to MyISAM and row_format to Dynamic but nothing changed.
My Hardware is very strong but it took about a minute to execute !
I am a programmer and newbie to mysql
How can Speed Up this query?
Thanks in Advance

© Stack Overflow or respective owner

Related posts about mysql

Related posts about optimization