educative.io

Not explained why it would be "catastrophic" if leaf nodes of InnoDB would point to rows

“This could be catastrophic if the leaf nodes of an InnoDB secondary index pointed to row locations on disk” - but it is not explained further, why it is the case, and what is the difference between InnoDB and MyISAM in that case? Thanks!


Course: https://www.educative.io/collection/5352985413550080/6335716377231360
Lesson: https://www.educative.io/collection/page/5352985413550080/6335716377231360/5601324986007552

Hi @Dmitry_Polovinkin
Thank you for reaching out about this. I hope everything is going well with you. I will try my best to answer your query.

As shown in the above paragraph of the same lesson. We have attached a screenshot as well it says that “in case of InnoDB, the secondary index’s leaf nodes don’t point to the rows as they do in MyISAM. Remember that pages can be split and merged, and the rows can be physically moved around on the disk.”
So, “This could be catastrophic if the leaf nodes of an InnoDB secondary index pointed to row locations on disk” means that we may end up in scattered or corrupt data.
https://www.educative.io/courses/introductory-guide-to-sql/qVj136lBgR3

I hope that this guide is helpful.

Regards,
Educative Team