In this post I would like to describe step-by-step process how a query can be optimized. This is taken from real practice I faced not so long ago. So, I’ve got a query that joined about 20 tables, had ORDER BY statement and rather complex WHERE clause that looked like:…