drpout / boilr

Price alarms for Bitcoin, cryptocurrencies, cryptoassets, futures and options.
http://boilr.mobi
GNU General Public License v3.0
128 stars 67 forks source link

Improve DB schema #242

Open dllud opened 7 years ago

dllud commented 7 years ago

Currently, alarms are stored in DB as a byte array. Everytime a field gets modified the entire alarm must be serialized and rewritten to the DB. This may become critical since we are now storing alarms quite often due to #224 and #146. We should check if we can get a performance boost with a custom built DB schema.

I expect little or no gain for PriceHitAlarms since they are rather small. Though it might work good with RollingPriceChangeAlarms, as those get rather big as their value buffer grows.