explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XJFX

Settings
# exclusive inclusive rows x rows loops node
1. 0.038 4,408.600 ↑ 1.0 800 1

Limit (cost=349,763.62..349,803.62 rows=800 width=122) (actual time=4,408.448..4,408.600 rows=800 loops=1)

2. 75.835 4,408.562 ↑ 310.4 800 1

WindowAgg (cost=349,763.62..362,178.27 rows=248,293 width=122) (actual time=4,408.447..4,408.562 rows=800 loops=1)

3. 307.669 4,332.727 ↑ 1.0 248,197 1

GroupAggregate (cost=349,763.62..356,591.67 rows=248,293 width=114) (actual time=3,998.129..4,332.727 rows=248,197 loops=1)

  • Group Key: i.id, boc.id
4. 122.647 4,025.058 ↓ 1.0 255,781 1

Sort (cost=349,763.62..350,384.35 rows=248,293 width=91) (actual time=3,998.111..4,025.058 rows=255,781 loops=1)

  • Sort Key: i.id, boc.id
  • Sort Method: external merge Disk: 24544kB
5. 3,039.413 3,902.411 ↓ 1.0 255,781 1

Nested Loop Left Join (cost=3.82..314,781.47 rows=248,293 width=91) (actual time=0.074..3,902.411 rows=255,781 loops=1)

  • Join Filter: (i.tags @> ARRAY[t.id])
  • Rows Removed by Join Filter: 19595905
6. 45.943 118.407 ↑ 1.0 248,197 1

Hash Left Join (cost=3.82..20,552.28 rows=248,293 width=95) (actual time=0.040..118.407 rows=248,197 loops=1)

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

Seq Scan on bo_instance i (cost=0.00..19,862.59 rows=248,293 width=86) (actual time=0.006..72.435 rows=248,197 loops=1)

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

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

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

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

10. 744.578 744.591 ↑ 1.0 79 248,197

Materialize (cost=0.00..2.19 rows=79 width=17) (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=17) (actual time=0.003..0.013 rows=79 loops=1)

Planning time : 0.364 ms
Execution time : 4,414.595 ms