Sample Header Ad - 728x90

Which indexes create to speed up a query with where

1 vote
1 answer
62 views
I have a query but I do not know which index create to speed-up it. This is the query: select id_my_table from my_table where now() between created_data and ifnull(finish_data, now()) and stato = 1 and closed != 1 and closed = 0 and deleted = 0 and id_my_table_type in (3, 5) I can not change the query, I just would like to speed-up. If I EXPLAIN the query I see that mysql does not use any index.
Asked by Giacomo M (163 rep)
Mar 1, 2024, 01:32 PM
Last activity: Mar 1, 2024, 02:03 PM