Hacker News new | ask | show | jobs
by pjungwir 4722 days ago
This is the approach recommended by Ralph Kimball for data warehouses. I haven't tried it for OLTP systems. I'd be more inclined to go with ad hoc functional indexes (as recommended by another commenter) based on what queries the system actually runs. But if you have a reporting interface that permits arbitrary group-by functionality, like in a data warehouse, I think it's the way to go.

EDIT: Technically chaz is right and a data warehouse puts all these date columns in a separate table you can join against.