explain.depesz.com

PostgreSQL's explain analyze made readable

Result: I70x

Settings
# exclusive inclusive rows x rows loops node
1. 382.937 30,028.660 ↓ 408,497.0 408,497 1

Nested Loop Anti Join (cost=22,064.86..98,471.77 rows=1 width=20) (actual time=1,782.842..30,028.660 rows=408,497 loops=1)

  • Join Filter: (d.resource_id = r.id)
2. 722.057 10,854.861 ↓ 408,497.0 408,497 1

Nested Loop (cost=22,064.58..98,466.14 rows=1 width=53) (actual time=1,782.810..10,854.861 rows=408,497 loops=1)

3. 2,556.603 5,442.327 ↓ 213,203.5 426,407 1

Hash Join (cost=22,064.15..98,464.85 rows=2 width=49) (actual time=1,479.021..5,442.327 rows=426,407 loops=1)

  • Hash Cond: ((o.version_md5 = v.version_md5) AND (r.resource_config_scope_id = v.resource_config_scope_id))
4. 533.991 2,202.735 ↓ 244.6 1,628,768 1

Nested Loop (cost=100.57..72,242.70 rows=6,659 width=45) (actual time=0.037..2,202.735 rows=1,628,768 loops=1)

5. 0.156 0.156 ↓ 2.4 12 1

Index Scan using resources_pipeline_id on resources r (cost=0.41..23.94 rows=5 width=8) (actual time=0.014..0.156 rows=12 loops=1)

  • Index Cond: (pipeline_id = 303697)
6. 1,321.392 1,668.588 ↓ 26.5 135,731 12

Bitmap Heap Scan on build_resource_config_version_outputs o (cost=100.17..14,392.48 rows=5,127 width=41) (actual time=40.514..139.049 rows=135,731 loops=12)

  • Recheck Cond: (resource_id = r.id)
  • Heap Blocks: exact=140912
7. 347.196 347.196 ↓ 26.5 135,731 12

Bitmap Index Scan on build_resource_config_version_outputs_resource_id_idx (cost=0.00..98.89 rows=5,127 width=0) (actual time=28.933..28.933 rows=135,731 loops=12)

  • Index Cond: (resource_id = r.id)
8. 319.473 682.989 ↓ 1.0 393,858 1

Hash (cost=12,604.70..12,604.70 rows=393,392 width=45) (actual time=682.989..682.989 rows=393,858 loops=1)

  • Buckets: 65536 Batches: 16 Memory Usage: 2467kB
9. 363.516 363.516 ↓ 1.0 393,858 1

Seq Scan on resource_config_versions v (cost=0.00..12,604.70 rows=393,392 width=45) (actual time=0.019..363.516 rows=393,858 loops=1)

  • Filter: (check_order <> 0)
  • Rows Removed by Filter: 959
10. 4,690.477 4,690.477 ↑ 1.0 1 426,407

Index Scan using builds_pkey on builds b (cost=0.43..0.64 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=426,407)

  • Index Cond: (id = o.build_id)
  • Filter: (status = 'succeeded'::build_status)
  • Rows Removed by Filter: 0
11. 18,790.862 18,790.862 ↓ 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.046..0.046 rows=0 loops=408,497)

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