Skip to content

Commit

Permalink
Fix: disable seq scan on leaderboard refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Feb 12, 2025
1 parent e389e9c commit 9f65653
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions database/functions/01_refresh_materialized_view.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ CREATE OR REPLACE PROCEDURE refresh_materialized_view(job_id INT, config JSONB)
LANGUAGE PLPGSQL AS
$$
BEGIN
SET enable_seqscan TO false;
REFRESH MATERIALIZED VIEW leaderboard;
SET enable_seqscan TO true;
END
$$;

Expand Down

0 comments on commit 9f65653

Please sign in to comment.