Storing an offset and a date range
Clearly, summary tables that aggregate time have implied start dates, which can be utilized to store date offsets from the start. However, because the summary table is much smaller than a fact table, the processing time necessary to convert the date offset to a physical date could form a substantial percentage of the total time. If this is the case, we recommend that you do not use date offsets within the summary table. Disk I/O rates become less of an issue when the data volumes are small, and processing time becomes more significant.
Date ranges are useful in that they can represent a significant aggregation of rows within the table. As before, this technique will increase the processing time, because it makes use of the between statement to satisfy the query. If the degree of aggregation caused by use of the date range is high, the scan time saved by reducing the data volumes will still outweigh the additional processing time. However, if the degree of aggregation is low, it may be more appropriate to expand all rows represented by a date range into individual rows.
At this point, it is also worth considering the requirements for specific user access tools. Many tools are unable to execute queries against fact tables that utilize date ranges, because they expect a key to a time dimension table. Storing date ranges within the fact table can result in significant savings in data storage and query performance. The saving within summaries will be proportionately less, because there will be a much smaller number of rows. Because of this, it is typically more effective to avoid the use of date ranges within summaries.