Skip to content

Commit

Permalink
Fix expensive event cleanup query (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgb authored Jul 1, 2024
1 parent 3eb1d4c commit 4761597
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions plane/src/database/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,7 @@ impl EventSubscriptionManager {
sqlx::query!(
r#"
delete from event
where id in (
select id
from event
where created_at < now() - make_interval(days => $1)
)
where created_at < now() - make_interval(days => $1)
"#,
min_age_days
)
Expand Down

0 comments on commit 4761597

Please sign in to comment.