Home Forum Software Database optimisations Reply To: Database optimisations

#678
uRADMonitor
Keymaster

Currently there is a single database for both development and production. There are two tables, one is devices and the other is uradmonitor.

t1) devices
Has a single row / uRADMonitor detector, the primary key is the device id. It holds only the latest readings, the 24h average for radiation (as CPM) , the detected location, the overridden location , country code and offline/online status (considered offline if no data received for more than 10minutes).
As we speak this has 116rows and uses a little over 12KB.

t2) uradmonitor
This now has 7,4 million rows and a size of 432MB.
Each unit in the network sends data via a HTTP Get call to the data.uradmonitor.com . The parameters include the unit ID, measurements and a CRC. All this data gets into the database.
So each minute, one station send aprox. 58Bytes of data to the server.
The problem is we got quickly from one unit to ten, and we are now approaching 100 units.
Probably we’ll need to archive some of the old data. Would be nice to find a way to do it automatically, to get faster DB queries on the fresh data, but for scientific purposes to allow slower queries but on ALL the data.