mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-25 02:14:38 -05:00
fix(jdbc-postgres): drop the queues_pk and use an hash index instead (#2277)
This avoids the queues_pkey index to be used by the poll query which is suboptimal.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- We drop the PK, otherwise its index is used by the poll query which is sub-optimal.
|
||||
-- We create an hash index on offset that will be used instead when filtering on offset.
|
||||
ALTER TABLE queues DROP CONSTRAINT IF EXISTS queues_pkey;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS queues_offset ON queues USING hash ("offset");
|
||||
Reference in New Issue
Block a user