Skip to content
Advertisement

How do I properly optimize this query?

I’m trying to optimize the following query. I’ve used EXPLAIN to troubleshoot but it keeps showing up in our logs as a non-indexed query. What am I missing? I’ve created indexes on all columns referenced, but it’s still showing up.

Advertisement

Answer

If you have a big table which contains millions of row, it would be the best to have where condition to filter out the data to make query run faster.

Indexing will help in retrieving data so just having index does not make query to run faster.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement