mirror of
https://github.com/dcarrillo/atalaya.git
synced 2026-04-18 02:24:05 +00:00
7 lines
429 B
SQL
7 lines
429 B
SQL
-- Indexes for status page & aggregation performance
|
|
CREATE INDEX idx_checked_at ON check_results(checked_at);
|
|
CREATE INDEX idx_hourly_timestamp ON check_results_hourly(hour_timestamp);
|
|
|
|
-- Optional covering index for aggregation queries
|
|
-- Includes all columns needed for hourly aggregation to avoid table lookups
|
|
CREATE INDEX idx_checked_at_monitor_covering ON check_results(checked_at, monitor_name, status, response_time_ms); |