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
How many entries do you have in your table? Billions?
I don’t think so that you can speed up your request, but you need to create a covered index in your table.
It could be like the following, but you need to take a look of the theory first to write the field in the right order (field with most possibilities first, …)(link above)