DEV Community

[Comment from a deleted post]
Collapse
 
buinauskas profile image
Evaldas Buinauskas

I wouldn't strictly say not to store dates as year, month and day.

In some cases having date plus year column, or even month could lead to way more efficient queries because database won't have to perform range queries which are expensive.

Yet again, this is a rare case, but when controlled properly, can be powerful.

Collapse
 
randysims profile image
randysims

Yes, we have a dimension like this for dates that stores dates and times like this, but cubes are a different thing with a different design.