Adam Bloom
02/01/2023, 7:14 PMprha
02/01/2023, 7:24 PMAdam Bloom
02/01/2023, 7:25 PMruns
has one on run_id, but not pipeline_name and run_idLatestRunTagQuery
prha
03/29/2023, 7:56 PMAdam Bloom
03/29/2023, 8:00 PMprha
03/29/2023, 8:08 PMAdam Bloom
03/29/2023, 8:10 PMLimit (cost=7252.73..7252.74 rows=3 width=1240) (actual time=22.041..22.049 rows=26 loops=1)
-> Sort (cost=7252.73..7252.74 rows=3 width=1240) (actual time=22.039..22.045 rows=26 loops=1)
Sort Key: runs.id DESC
Sort Method: top-N heapsort Memory: 77kB
-> Hash Semi Join (cost=3032.95..7252.71 rows=3 width=1240) (actual time=19.412..21.651 rows=1277 loops=1)
Hash Cond: ((runs.run_id)::text = (run_tags.run_id)::text)
-> Index Scan Backward using idx_runs_by_job on runs (cost=0.42..4216.89 rows=1223 width=1277) (actual time=0.034..1.503 rows=1277 loops=1)
Index Cond: (pipeline_name = 'airbyte_sync_core'::text)
-> Hash (cost=3022.06..3022.06 rows=838 width=37) (actual time=19.369..19.370 rows=6951 loops=1)
Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 533kB
-> Bitmap Heap Scan on run_tags (cost=17.14..3022.06 rows=838 width=37) (actual time=1.242..17.626 rows=6951 loops=1)
Recheck Cond: ((key = '.dagster/repository'::text) AND (value = 'core@agile-user-code'::text))
Heap Blocks: exact=5007
-> Bitmap Index Scan on idx_run_tags (cost=0.00..16.93 rows=838 width=0) (actual time=0.693..0.693 rows=6951 loops=1)
Index Cond: ((key = '.dagster/repository'::text) AND (value = 'core@agile-user-code'::text))
Planning Time: 0.311 ms
Execution Time: 22.242 ms
explain analyze SELECT runs.id, runs.run_body, runs.status, runs.create_timestamp, runs.update_timestamp, runs.start_time, runs.end_time
FROM runs
WHERE runs.pipeline_name = 'airbyte_sync_core' AND runs.run_id IN (SELECT run_tags.run_id
FROM run_tags
WHERE run_tags.key = '.dagster/repository' AND run_tags.value = 'core@agile-user-code') order by runs.id desc
LIMIT 26;
prha
03/29/2023, 8:11 PM