-
-
Save anonymous/6d791da40fe25e096d89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test=# explain analyze select id from minion_jobs where state = 'inactive' and delayed < now() and task = any ('{foo,bar,baz,yada}') and queue = 'default' order by priority desc, created limit 1; | |
QUERY PLAN | |
---------------------------------------------------------------------------------------------------------------------------------------------------------- | |
Limit (cost=0.29..0.69 rows=1 width=20) (actual time=4.076..4.077 rows=1 loops=1) | |
-> Index Scan using minion_jobs_priority_created_idx on minion_jobs (cost=0.29..817.47 rows=2000 width=20) (actual time=4.074..4.074 rows=1 loops=1) | |
Filter: ((state = 'inactive'::minion_state) AND (queue = 'default'::text) AND (delayed < now()) AND (task = ANY ('{foo,bar,baz,yada}'::text[]))) | |
Rows Removed by Filter: 8000 | |
Planning time: 1.447 ms | |
Execution time: 4.149 ms | |
(6 rows) | |
(END) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment