explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HALy

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

Limit (cost=345,697.54..345,737.54 rows=800 width=122) (actual time=4,449.178..4,449.326 rows=800 loops=1)

2. 81.763 4,449.288 ↑ 306.8 800 1

WindowAgg (cost=345,697.54..357,968.54 rows=245,420 width=122) (actual time=4,449.176..4,449.288 rows=800 loops=1)

3. 315.864 4,367.525 ↓ 1.0 245,439 1

GroupAggregate (cost=345,697.54..352,446.59 rows=245,420 width=114) (actual time=4,024.373..4,367.525 rows=245,439 loops=1)

  • Group Key: i.id, boc.id
4. 124.230 4,051.661 ↓ 1.0 253,023 1

Sort (cost=345,697.54..346,311.09 rows=245,420 width=91) (actual time=4,024.302..4,051.661 rows=253,023 loops=1)

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

Nested Loop Left Join (cost=3.82..311,140.45 rows=245,420 width=91) (actual time=0.152..3,927.431 rows=253,023 loops=1)

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

Hash Left Join (cost=3.82..20,315.76 rows=245,420 width=114) (actual time=0.073..125.928 rows=245,439 loops=1)

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

Seq Scan on bo_instance i (cost=0.00..19,634.00 rows=245,420 width=105) (actual time=0.009..77.842 rows=245,439 loops=1)

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

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

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

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

10. 736.280 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.037 0.037 ↑ 1.0 79 1

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

Planning time : 2.096 ms
Execution time : 4,456.128 ms