jdemaeyer / brightsky

JSON API for DWD's open weather data.
https://brightsky.dev/
MIT License
290 stars 18 forks source link

Explore database size optimizations #32

Closed jdemaeyer closed 4 years ago

jdemaeyer commented 4 years ago

Current database size:

Total database size:
   429 MB
Table sizes:
   410 MB  weather
     1 MB  sources

After declaring all weather columns as smallint:

Total database size:                                                 
   398 MB
Table sizes:
   380 MB  weather
     1 MB  sources
jdemaeyer commented 4 years ago

Not gonna pursue choosing smaller numeric column types for now, dealing with the encoding and decoding seems to be more trouble than it's worth for a best-case size reduction of 7 %