Comment to The need for speed
-
I think there is something more to notice in my sample. the loading time is less then half second, so there must be something else to steal time isnt it :)
Yes. There is something to notice. Scale. How many users do you have? What is the magnitude of your content?
As I write this email, I have 66006 accounts and 1727 discussion topics - some with hundreds of replies/comments. At that scale, we already know there are repeated queries being executed. Sure, a query cache can help, but that is not advisable according to the MariaDB developers. They prefer other solutions, and have deprecated the query cache in recent MariaDB versions.
At this scale, the repeated queries are indicitive of code that could be optimised to avoid the external calls for something that could be stored in memory. Additionally, the potential scale issues could be something to explore.