explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qmXQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.039 34,794.270 ↑ 1.0 800 1

Limit (cost=5,658,659.87..5,658,699.87 rows=800 width=122) (actual time=34,793.979..34,794.270 rows=800 loops=1)

2. 390.078 34,794.231 ↑ 24,518.9 800 1

WindowAgg (cost=5,658,659.87..6,639,417.22 rows=19,615,147 width=122) (actual time=34,793.978..34,794.231 rows=800 loops=1)

3. 18,006.957 34,404.153 ↑ 79.0 248,197 1

GroupAggregate (cost=5,658,659.87..6,198,076.41 rows=19,615,147 width=114) (actual time=14,321.847..34,404.153 rows=248,197 loops=1)

  • Group Key: i.id, boc.id
4. 13,846.470 16,397.196 ↑ 1.0 19,607,563 1

Sort (cost=5,658,659.87..5,707,697.74 rows=19,615,147 width=91) (actual time=14,321.685..16,397.196 rows=19,607,563 loops=1)

  • Sort Key: i.id, boc.id
  • Sort Method: external merge Disk: 2066632kB
5. 1,666.738 2,550.726 ↑ 1.0 19,607,563 1

Nested Loop Left Join (cost=3.82..265,743.60 rows=19,615,147 width=91) (actual time=0.049..2,550.726 rows=19,607,563 loops=1)

6. 48.461 139.397 ↑ 1.0 248,197 1

Hash Left Join (cost=3.82..20,552.28 rows=248,293 width=82) (actual time=0.043..139.397 rows=248,197 loops=1)

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

Seq Scan on bo_instance i (cost=0.00..19,862.59 rows=248,293 width=73) (actual time=0.008..90.907 rows=248,197 loops=1)

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

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

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

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

10. 744.575 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.016 0.016 ↑ 1.0 79 1

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

Planning time : 0.457 ms
Execution time : 35,006.597 ms