It is usually the most efficient practice to retrieve a small number of time series at each iteration of the SQL_Retrieve
–TS_Compute
–SQL_store
loop, and distribute this computation across multiple machines if possible. An example runscript is given in the code that accompanies this document, as sample_runscript_sql
, which retrieves a single time series at a time, computes it, and then writes the results back to the database in a loop. This can be viewed as a template for runscripts that one may wish to use when performing time-series calculations across the database.