Hi Dale,
TL;DR
I would not bother. Disk space is cheap compared to your time and
there would not be any measurable performance gains.
Details
These data sets are not large and the read/write rate is
peanuts.
The default values for these NULL'able columns is NULL. At the time
of INSERT, when a column value is not specified, the database engine
will look at column constraints and if there are defaults, set them.
For the transaction rate for this application, it would be a
minuscule amount of time. Probably microseconds.
For storage, a NULL'able column does take much space but unless the
entire table is constantly being read, the working-set of data will
be in RAM.
Empirically, I have been running weewx since July 1st, 2025 (ish).
Roughly nine months. The last time I updated my OS (I run a rolling
distro), was 38 days ago. My "server" (it is a klunker laptop) has 8
GB of RAM. 5.1 GB is in use for buffers (kernel) and cache. I am
only using 879 MB.
I forced a report generation and we can see disk usage is very low.
I peakd at 77 IOPS (all writes).
01:32:24 PM tps rkB/s wkB/s
dkB/s areq-sz aqu-sz await %util DEV
01:33:24 PM 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 sda
01:33:27 PM 6.33 97.33 8.00 0.00 16.63
0.00 0.32 0.17 sda
01:33:30 PM 16.00 0.00 597.33 0.00 37.33
0.01 0.54 0.53 sda
01:33:33 PM 1.00 0.00 140.00 0.00 140.00
0.00 1.67 0.13 sda
01:33:36 PM 77.33 0.00 381.33 0.00 4.93
0.01 0.16 1.17 sda
01:33:39 PM 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 sda
I am running MariaDB for no reason. Probably dumb of me. I should
switch back to SQLite. :)
Cheers!