I have a list of sensors of many machines, that stores on a second base (i.e., 86400 records each day for each machine). One of the many columns is the datetime of the value (that can also be stored separately as date and time). I'm using PostgreSQL 9.5.
Frequently, I need to find out what dates have sensor's records available for each machine.
I thought about creating a database view of distinct dates for each machine, but after searching for "materialized views" I think I'm ok with updating this list once in a while each day, as data is stored daily.
Would anyone give any advice about doing it?
The table is similar to
ID | Machine_code | Sensor_1 | Sensor_2 | Sensor3 | Datetime 1 | Drimmer | 12 | 15.8 | 13.4 | 2016-03-03 10:00:03 GMT+1
If it helps anyhow, I'm using Django Framework in front of it.