O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to know that the query is spending time in evaluating plans?

If you are joining 10 tables (mostly autogenerated by ORM), run an explain plan. If it takes more time, it means that the query is spending too much time in evaluating plans. Adjust the value of optimizer_search_depth (probably set to 0) and check how much time the explain plan takes. Also note down the change in plans when you adjust the value of optimizer_search_depth.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required