That comparison was basically what I was investigating - on-the-fly calcs taking minutes, vs fractions of a seconds to retrieve from a DB. Add to that... to do the calculation you might need to retrieve twice as much data anyway and redo the day-archive calculations every cycle.
As you suggest, I am sure there are ways, such as numpy perhaps, that allow you to handle vectors far more efficiently, but I am doubtful that it would be worth the trouble. Especially now that sqlite can add columns far more easily. Cameron. On Friday 29 December 2023 at 12:42:43 am UTC+10 Greg Troxel wrote: > "'Cameron D' via weewx-development" <[email protected]> > writes: > > > My assumption would be that any derivable value that you want to plot > > should be a column in the database. Even if you could speed it up, the > > calculation it would need to be by a factor approaching 100 to be a > useful > > choice. > > I think that using derived parameters for only a "current" display > should > > be OK, but as soon as you want to plot it or include it in stats then > each > > report has to process the year's worth. > > While I more or less see your point, have you benchmarked the cost of > extra database columns vs computing on the fly? In most computers these > days I would expect CPU is much faster than storage. > > Stats though there is a stronger argument for storing it. > 1 > -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/4151a7dc-7592-412c-bd6d-f78593a41db6n%40googlegroups.com.
