Skip to content

Commit

Permalink
Added index to workload_metrics table
Browse files Browse the repository at this point in the history
  • Loading branch information
patilsuraj767 committed Sep 25, 2023
1 parent ffeb02a commit dc2b1a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions migrations/000006_create_workload_metrics_table.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ON DELETE CASCADE;
ALTER TABLE workload_metrics
ADD CONSTRAINT UQ_Workload_Metrics UNIQUE (org_id, workload_id, container_name, interval_start, interval_end);

CREATE INDEX IF NOT EXISTS idx_workload_metrics_workload_id_interval_end ON workload_metrics(workload_id, interval_end);

CREATE OR REPLACE FUNCTION workload_metrics_insert_trigger_func() RETURNS trigger AS
$BODY$
Expand Down

0 comments on commit dc2b1a3

Please sign in to comment.