Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
(Filing this based on discussion with Monty, inspired by SNow case)
When InnoDB table has very wide rows (1000s of columns) , the row will be stored on multiple disk pages, which are not necessarily consecutive in the data file.
If one runs a query:
select count(*) from t1 where column_N is null; |
for each row read, InnoDB would have to scan multiple pages with parts of the row until it reaches column_N. Actually, the NULL-bit is stored at the start of the row.
The scan could be made much faster if the storage engine informed InnoDB that it only needs null-flag(column_N) and InnoDB has returned just that.