mirror of
https://github.com/dcarrillo/atalaya.git
synced 2026-04-18 02:24:05 +00:00
7
migrations/0003_indexes.sql
Normal file
7
migrations/0003_indexes.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- 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);
|
||||
Reference in New Issue
Block a user