4

Is there a way to generate a list of JOINS being performed without indexes in MySQL?

Andrew Winter
  • 261
  • 4
  • 12

1 Answers1

4

If you have available a list of SELECT queries your application performs, just put log-queries-not-using-indexes in your my.cnf, restart MySQL and execute all the SELECTs. Then read the log file.

Alternatively you can run EXPLAIN SELECT your_query_using_JOIN and read the output.

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78