Database behavior


Greetings again.

I had a few questions regarding the expected behavior once the database is full. Specifically:

  1. Once the database is full, how is new device data handled? Are the oldest records deleted as new ones are added? Are new data records dropped?
  2. If devices are deleted, are their records deleted from the database? If not, how would one manually delete these stale records?

Thanks for the tips!


There is no automatic DB management.
If a DB is over limit, INSERT will fail.
If you delete a device, its records remain.
DB is under your full control and it is your responsibility to vaccum, delete old records, etc.



Thanks for these details - looks like I would have found out the hard way is a short period of time.

Would be great if mDash could implement a threshold alert whereby the owner was notified when the database size was approaching its limit. Far better than having that same owner getting angry calls from his customers when that limit was reached.



That’s a good idea!
We’ll do that.


On a related note:

When the mDash dashboard reports the database used, e.g.:

DB size: 1085440
Max size: 5120000

…are these numbers referring to db records or file size?



The file size.

The limitation is set on file size, the internal structure of the database is up to a user.