Remove stale data trigger on da_datum and da_loc_datum tables

XMLWordPrintable

    • 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.

            Assignee:
            Matt Magoffin
            Reporter:
            Matt Magoffin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: