Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top