-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: DB
-
None
Currently the solardatum.da_datum table has a row-level trigger that invokes solardatum.trigger_agg_stale_datum on every INSERT, UPDATE, and DELETE. This makes bulk changes very slow, as the trigger is expensive (e.g. NET-264). The purpose of this trigger is to keep track of which hourly aggregate datum rows are stale and need to be processed, inserting appropriate rows into the solaragg.agg_stale_datum table.
In order to support more efficient bulk operations as well as future changes like aggregate processing in an external system (e.g. Kafka Streams) it makes sense to remove this trigger and replace it by an application-specific mechanism that populates the solaragg.agg_stale_datum table.
Similarly, the solardatum.da_loc_datum table has a row-level trigger that invokes solardatum.trigger_agg_stale_loc_datum and inserts rows into the solaragg.agg_stale_loc_datum table. This should be replaced by a similar application-specific mechanism.
- relates to
-
NET-264 Deleting datum data takes too long
-
- Closed
-