So the last article discussed chapter 4 of High Performance MySQL titled Optimizing Schema and Data Types. Today's article discusses chapter 5 titled Indexing for High Performance. In the last chapter we discussed schema design choices and optimizati...

Markdown supported · ⌘↵ to post
SELECT ... WHERE date_col >= DATE_SUB(CURRENT_DATE, INTERVAL 10 days); There is a subtlety in the new query that using an always changing value like CURRENT_DATE although we don't need the entire date, just the days, will cause this query to miss the cache all the time. Is this argument still valid? as there is no query cache any more (by default at least)
In the clustered indexes section, in the second paragraph, you said that that clustered means that the "whole table" is stored in the index leaf nodes, while in the third paragraph you said that the leaf nodes in the clustered index contain the entire "row", so which of them is true? Or you intended to say in the third paragraph that the leaf nodes have the row itself not a pointer to its position in disk?
Match a leftmost prefix is quite not clear. Could you please explain it in a more clear way?
Ahmed Ramadan
Software Engineer
Thank you for sharing. It had a significant impact on me, and I truly appreciate the effort and knowledge you put into it.