0

(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?

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.