Mar 27, 2023
Nice article.
I must say however that saving intermediate results may have even a bigger impact on the performance than what you said about HAVING.
Best query optimizers today can save in-memory intermediate results and reuse them, making the HAVING clause as fast as WHERE.
But it was an interesting point, worth mentioning...