-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
We have a postgresql table with about 28 million facts with a financial_year column. Users can use the babbage API to essentially query the distinct financial_year values, which is about 10 unique values.
Postgresql seems to be very naive when doing SELECT DISTINCT financial_year FROM table because it runs a table scan even though financial_year has an index, which takes 60+ seconds. This seems to be a known problem with postgresql.
How have others solved this problem? Do we split out the financial_year data (and all the other dimensions of a fact) into a separate table?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels