Skip to content

Dispatch Regional Summary graph data points missing if SCADA data missing #1

@hnougher

Description

@hnougher

Noticed today, if the SCADA table is missing data points, the whole graph is missing the data points.

This comes from a required optimisation to explicitly date range the SCADA table lookup for performance.
Specifically this line

AND settlementdate_inner >= DATE_TRUNC('hour', NOW() - CAST(:interval AS Interval) + INTERVAL '5 min')

Removing this line solves the problem, but the query takes about 30x longer since it scans the entire SCADA table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions