I am working with postgres and php.
I have tens of millions of records in my table and want hourly,monthly and yearly data from that table.
If I select hour then it should result hourly records within selected range.
Should I implement Views, temporary tables or something else whatever useful for this for better performance?
Have you created any indexes on the date columns?
If you are aggregating the data for a report, then you could create a batch job that populates an Aggregated Fact Table each night.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.