With the standard data warehousing queries we have a fact table
and dimension tables and we join them.
For example, the fact table (Table size: 5M rows, ~2G in size)
from my previous Loose index scan vs. covered indexes in MySQL
post:
CREATE TABLE `ontime_2010` ( `YearD` int(11) DEFAULT NULL, `MonthD` tinyint(4) DEFAULT NULL, `DayofMonth` tinyint(4) DEFAULT NULL, `DayOfWeek` tinyint(4) DEFAULT NULL, `Carrier` char(2) DEFAULT NULL, `Origin` char(5) DEFAULT NULL, `DepDelayMinutes` int(11) DEFAULT NULL, `AirlineID` int(11) DEFAULT NULL, `Cancelled` tinyint(4) DEFAULT NULL, ... more fields here ... ) ENGINE=InnoDB DEFAULT CHARSET=latin1
(this is not the best possible fact table as the data is not aggregated by I’ll use it for now).
And we have those …
[Read more]