explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zlu8

Settings
# exclusive inclusive rows x rows loops node
1. 1,190.488 65,264.327 ↓ 408,497.0 408,497 1

Nested Loop Anti Join (cost=19,853.20..95,567.92 rows=1 width=20) (actual time=5,252.095..65,264.327 rows=408,497 loops=1)

  • Join Filter: (d.resource_id = r.id)
2. 933.333 28,534.600 ↓ 408,497.0 408,497 1

Nested Loop (cost=19,852.93..95,562.29 rows=1 width=53) (actual time=5,252.034..28,534.600 rows=408,497 loops=1)

3. 6,701.248 16,088.521 ↓ 213,199.0 426,398 1

Hash Join (cost=19,852.50..95,561.01 rows=2 width=49) (actual time=4,469.602..16,088.521 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,936.931 7,935.985 ↓ 244.4 1,628,759 1

Nested Loop (cost=100.54..72,175.84 rows=6,665 width=45) (actual time=0.049..7,935.985 rows=1,628,759 loops=1)

5. 0.122 0.122 ↓ 2.4 12 1

Index Scan using resources_pipeline_id on resources r (cost=0.41..23.84 rows=5 width=8) (actual time=0.030..0.122 rows=12 loops=1)

  • Index Cond: (pipeline_id = 303697)
6. 4,663.668 5,998.932 ↓ 26.5 135,730 12

Bitmap Heap Scan on build_resource_config_version_outputs o (cost=100.13..14,379.18 rows=5,122 width=41) (actual time=149.794..499.911 rows=135,730 loops=12)

  • Recheck Cond: (resource_id = r.id)
  • Heap Blocks: exact=140908
7. 1,335.264 1,335.264 ↓ 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=111.272..111.272 rows=135,730 loops=12)

  • Index Cond: (resource_id = r.id)
8. 652.618 1,451.288 ↓ 1.0 334,035 1

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

  • Buckets: 65536 Batches: 8 Memory Usage: 3783kB
9. 798.670 798.670 ↓ 1.0 334,035 1

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

  • Filter: (check_order <> 0)
  • Rows Removed by Filter: 753
10. 11,512.746 11,512.746 ↑ 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.026..0.027 rows=1 loops=426,398)

  • Index Cond: (id = o.build_id)
  • Filter: (status = 'succeeded'::build_status)
  • Rows Removed by Filter: 0
11. 35,539.239 35,539.239 ↓ 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.95 rows=1 width=37) (actual time=0.087..0.087 rows=0 loops=408,497)

  • Index Cond: (version_md5 = v.version_md5)
  • Heap Fetches: 0