jonneytest / sma-bluetooth

Automatically exported from code.google.com/p/sma-bluetooth
0 stars 0 forks source link

Database Entries cause Flash Drive Defects #101

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I use a raspberrypi based data-logger version of smatool. So fine so good, 
everything works perfect.
2. I made a bash script to load all data I had previously downloaded from my 
inverter to complete the database. The script adds all entries line-wise. As 
far as I have seen, so does the tool too.
3. The problem is, that flash based drives, so as for example the SD card in my 
raspberry has a limited amount of write cycles. After 1 year and two months of 
line wise added entries, the SD card died. I just changed my script to load all 
data daywise into the database. It's a long sql statement, yes, but it is 
faster compared to linewise entries and it does not harm the flash drive that 
bad.

I'd suggest to change the sql statement to a concatenated long sql statement to 
feed a larger amount of data at once.

I use v0.18, on a debian linux distribution and i use a raspberrypi.

Original issue reported on code.google.com by f28...@gmail.com on 15 Sep 2012 at 7:29