سؤال

(In this question, I assume that the data of a table is acťually an index (PRIMARY), so I don't differentiate between table data and column indexes)

I've compacted an "old" InnoDB table (via null ALTER TABLE), and observed the space taken by the indexes, before and after, via the mysql.innodb_index_stats table.

The size decreased (for some indexes, significantly); this lead to a question: can a single InnoDB page contain data from different indexes?

هل كانت مفيدة؟

المحلول

No a page can only hold records from a single index. see: innodb page header docs long story short - you have a field PAGE_INDEX_ID which is an identifier of the index the page belongs to.

Regards,
Jony

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى dba.stackexchange
scroll top