Skip to content

Commit

Permalink
Performance improvmeent for OCP label deletes (#5362)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcouzens authored Nov 6, 2024
1 parent 4725360 commit 2f4ebe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ ON CONFLICT DO NOTHING
DELETE FROM {{schema | sqlsafe}}.reporting_ocpstoragevolumelabel_summary AS ls
WHERE uuid IN (
SELECT uuid FROM {{schema | sqlsafe}}.reporting_ocpstoragevolumelabel_summary AS ls
WHERE EXISTS (
WHERE ls.report_period_id IN {{ report_period_ids | inclause }}
AND EXISTS (
SELECT 1
FROM {{schema | sqlsafe}}.reporting_enabledtagkeys AS etk
WHERE etk.enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ create unique index ix_cte_kv_cluster_agg_{{uuid | sqlsafe}}
DELETE FROM {{schema | sqlsafe}}.reporting_ocpusagepodlabel_summary AS ls
WHERE uuid IN (
SELECT uuid FROM {{schema | sqlsafe}}.reporting_ocpusagepodlabel_summary as ls
WHERE EXISTS (
WHERE ls.report_period_id IN {{ report_period_ids | inclause }}
AND EXISTS (
SELECT 1
FROM {{schema | sqlsafe}}.reporting_enabledtagkeys AS etk
WHERE etk.enabled = false
Expand Down

0 comments on commit 2f4ebe5

Please sign in to comment.