explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GfpA

Settings
# exclusive inclusive rows x rows loops node
1. 0.037 4,255.272 ↑ 1.0 800 1

Limit (cost=379,984.54..380,024.54 rows=800 width=122) (actual time=4,255.127..4,255.272 rows=800 loops=1)

2. 70.476 4,255.235 ↑ 306.8 800 1

WindowAgg (cost=379,984.54..392,255.54 rows=245,420 width=122) (actual time=4,255.127..4,255.235 rows=800 loops=1)

3. 293.632 4,184.759 ↓ 1.0 245,439 1

GroupAggregate (cost=379,984.54..386,733.59 rows=245,420 width=114) (actual time=3,865.651..4,184.759 rows=245,439 loops=1)

  • Group Key: i.id, boc.id
4. 115.267 3,891.127 ↓ 1.0 253,023 1

Sort (cost=379,984.54..380,598.09 rows=245,420 width=91) (actual time=3,865.635..3,891.127 rows=253,023 loops=1)

  • Sort Key: i.id, boc.id
  • Sort Method: external merge Disk: 24256kB
5. 2,878.102 3,775.860 ↓ 1.0 253,023 1

Nested Loop Left Join (cost=3.82..345,427.45 rows=245,420 width=91) (actual time=0.119..3,775.860 rows=253,023 loops=1)

  • Join Filter: (i.tags @> ARRAY[t.id])
  • Rows Removed by Join Filter: 19378023
6. 42.627 161.441 ↓ 1.0 245,439 1

Hash Left Join (cost=3.82..54,602.76 rows=245,420 width=114) (actual time=0.078..161.441 rows=245,439 loops=1)

  • Hash Cond: (i.bo_class_id = boc.id)
7. 118.794 118.794 ↓ 1.0 245,439 1

Seq Scan on bo_instance i (cost=0.00..53,921.00 rows=245,420 width=105) (actual time=0.055..118.794 rows=245,439 loops=1)

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

Hash (cost=2.81..2.81 rows=81 width=17) (actual time=0.020..0.020 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.003..0.011 rows=81 loops=1)

10. 736.309 736.317 ↑ 1.0 79 245,439

Materialize (cost=0.00..2.19 rows=79 width=17) (actual time=0.000..0.003 rows=79 loops=245,439)

11. 0.008 0.008 ↑ 1.0 79 1

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

Planning time : 0.279 ms
Execution time : 4,261.333 ms