I'm going to fix ticket #23242 by adding an option to approximate the date_hierarchy options instead of calculating them exactly. The implementation is straightforward but I'm not sure what the interface should be.
The basic idea is instead of doing `SELECT DISTINCT date_trunc('year', created_at) FROM table`, then a date_trunc('month', created_at) to get the list of months, and so on, you can find the range with `SELECT date_trunc('year', max(created_at)), date_trunc('year', min(creeated_at))` and just assume that every year/month/day in between is filled in.
How should this feature be enabled? Should it be possible to approximate the year list, but once you've selected the year switch to exact? I'm thinking something like:
- approximate_date_hierarchy = False # default
- approximate_date_hierarchy = 1 # approximate years only
- approximate_date_hierarchy = 2 # approximate months and years
- approximate_date_hierarchy = 3 or True # approximate days, months, and years