I recently encountered a problem where the EXPLAIN plan for a MySQL query had changed dramatically and was negatively impacting query run times. In our efforts to fix the problem, we considered increasing the innodb_stats_sample_page from the MySQL default of 8. During my search I've found literature on the pros and cons of doing that, as well as how to choose an optimal value for that variable, but I was unable to find any explanation on what a sample page actually is.
The purpose of them is clear:
The MySQL query optimizer uses estimated statistics about key distributions to choose the indexes for an execution plan, based on the relative selectivity of the index. Certain operations cause InnoDB to sample random pages from each index on a table to estimate the cardinality of the index. (This technique is known as random dives.) These operations include the ANALYZE TABLE statement, the SHOW TABLE STATUS statement, and accessing the table for the first time after a restart.
That page doesn't explain what a sample page actually is though. So, what exactly is a sample page?