explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y4Na9

Settings
# exclusive inclusive rows x rows loops node
1. 0.038 33,938.856 ↑ 1.0 800 1

Limit (cost=5,656,117.80..5,656,157.80 rows=800 width=122) (actual time=33,938.571..33,938.856 rows=800 loops=1)

2. 380.966 33,938.818 ↑ 24,508.2 800 1

WindowAgg (cost=5,656,117.80..6,636,444.60 rows=19,606,536 width=122) (actual time=33,938.570..33,938.818 rows=800 loops=1)

3. 17,452.408 33,557.852 ↑ 79.0 248,197 1

GroupAggregate (cost=5,656,117.80..6,195,297.54 rows=19,606,536 width=114) (actual time=14,153.628..33,557.852 rows=248,197 loops=1)

  • Group Key: i.id, boc.id
4. 13,631.929 16,105.444 ↓ 1.0 19,607,563 1

Sort (cost=5,656,117.80..5,705,134.14 rows=19,606,536 width=91) (actual time=14,153.533..16,105.444 rows=19,607,563 loops=1)

  • Sort Key: i.id, boc.id
  • Sort Method: external merge Disk: 2066632kB
5. 1,595.654 2,473.515 ↓ 1.0 19,607,563 1

Nested Loop Left Join (cost=3.82..265,629.66 rows=19,606,536 width=91) (actual time=0.034..2,473.515 rows=19,607,563 loops=1)

6. 45.270 133.270 ↓ 1.0 248,197 1

Hash Left Join (cost=3.82..20,545.97 rows=248,184 width=82) (actual time=0.029..133.270 rows=248,197 loops=1)

  • Hash Cond: (i.bo_class_id = boc.id)
7. 87.979 87.979 ↓ 1.0 248,197 1

Seq Scan on bo_instance i (cost=0.00..19,856.58 rows=248,184 width=73) (actual time=0.005..87.979 rows=248,197 loops=1)

  • Filter: (NOT is_deleted)
  • Rows Removed by Filter: 161
8. 0.010 0.021 ↑ 1.0 81 1

Hash (cost=2.81..2.81 rows=81 width=17) (actual time=0.021..0.021 rows=81 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
9. 0.011 0.011 ↑ 1.0 81 1

Seq Scan on bo_class boc (cost=0.00..2.81 rows=81 width=17) (actual time=0.004..0.011 rows=81 loops=1)

10. 744.578 744.591 ↑ 1.0 79 248,197

Materialize (cost=0.00..2.19 rows=79 width=9) (actual time=0.000..0.003 rows=79 loops=248,197)

11. 0.013 0.013 ↑ 1.0 79 1

Seq Scan on tag t (cost=0.00..1.79 rows=79 width=9) (actual time=0.002..0.013 rows=79 loops=1)

Planning time : 0.565 ms
Execution time : 34,134.782 ms