explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pK9N

Settings
# exclusive inclusive rows x rows loops node
1. 755.689 23,555.785 ↓ 408,497.0 408,497 1

Nested Loop Anti Join (cost=19,853.20..160,598.17 rows=1 width=20) (actual time=2,991.835..23,555.785 rows=408,497 loops=1)

2. 983.114 20,349.114 ↓ 408,497.0 408,497 1

Nested Loop (cost=19,852.93..160,592.77 rows=1 width=53) (actual time=2,991.822..20,349.114 rows=408,497 loops=1)

3. 5,013.241 10,838.040 ↓ 426,398.0 426,398 1

Hash Join (cost=19,852.50..160,592.13 rows=1 width=49) (actual time=2,529.991..10,838.040 rows=426,398 loops=1)

  • Hash Cond: ((o.version_md5 = v.version_md5) AND (r.resource_config_scope_id = v.resource_config_scope_id))
4. 1,193.748 4,461.073 ↓ 269.0 1,628,759 1

Nested Loop (cost=100.54..137,270.34 rows=6,055 width=45) (actual time=0.047..4,461.073 rows=1,628,759 loops=1)

5. 0.133 0.133 ↓ 1.1 12 1

Index Scan using resources_pipeline_id on resources r (cost=0.41..45.52 rows=11 width=8) (actual time=0.018..0.133 rows=12 loops=1)

  • Index Cond: (pipeline_id = 303697)
6. 2,478.492 3,267.192 ↓ 26.5 135,730 12

Bitmap Heap Scan on build_resource_config_version_outputs o (cost=100.13..12,423.76 rows=5,122 width=41) (actual time=87.927..272.266 rows=135,730 loops=12)

  • Recheck Cond: (resource_id = r.id)
  • Heap Blocks: exact=140908
7. 788.700 788.700 ↓ 26.5 135,730 12

Bitmap Index Scan on build_resource_config_version_outputs_resource_id_idx (cost=0.00..98.85 rows=5,122 width=0) (actual time=65.725..65.725 rows=135,730 loops=12)

  • Index Cond: (resource_id = r.id)
8. 673.482 1,363.726 ↓ 1.0 334,081 1

Hash (cost=11,817.10..11,817.10 rows=333,524 width=45) (actual time=1,363.726..1,363.726 rows=334,081 loops=1)

  • Buckets: 65536 Batches: 8 Memory Usage: 3784kB
9. 690.244 690.244 ↓ 1.0 334,081 1

Seq Scan on resource_config_versions v (cost=0.00..11,817.10 rows=333,524 width=45) (actual time=0.022..690.244 rows=334,081 loops=1)

  • Filter: (check_order <> 0)
  • Rows Removed by Filter: 753
10. 8,527.960 8,527.960 ↑ 1.0 1 426,398

Index Scan using builds_pkey on builds b (cost=0.43..0.63 rows=1 width=8) (actual time=0.020..0.020 rows=1 loops=426,398)

  • Index Cond: (id = o.build_id)
  • Filter: (status = 'succeeded'::build_status)
  • Rows Removed by Filter: 0
11. 2,450.982 2,450.982 ↓ 0.0 0 408,497

Index Only Scan using resource_disabled_versions_resource_id_version_md5_uniq on resource_disabled_versions d (cost=0.27..2.84 rows=1 width=37) (actual time=0.006..0.006 rows=0 loops=408,497)

  • Index Cond: ((resource_id = r.id) AND (version_md5 = v.version_md5))
  • Heap Fetches: 0