explain.depesz.com

PostgreSQL's explain analyze made readable

Result: la5O

Settings
# exclusive inclusive rows x rows loops node
1. 0.049 5,374.618 ↑ 1.0 800 1

Limit (cost=345,760.47..345,800.47 rows=800 width=122) (actual time=5,374.447..5,374.618 rows=800 loops=1)

2. 109.635 5,374.569 ↑ 306.8 800 1

WindowAgg (cost=345,760.47..358,033.92 rows=245,469 width=122) (actual time=5,374.445..5,374.569 rows=800 loops=1)

3. 401.340 5,264.934 ↑ 1.0 245,439 1

GroupAggregate (cost=345,760.47..352,510.87 rows=245,469 width=114) (actual time=4,827.162..5,264.934 rows=245,439 loops=1)

  • Group Key: i.id, boc.id
4. 168.915 4,863.594 ↓ 1.0 253,023 1

Sort (cost=345,760.47..346,374.15 rows=245,469 width=91) (actual time=4,827.143..4,863.594 rows=253,023 loops=1)

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

Nested Loop Left Join (cost=3.82..311,198.64 rows=245,469 width=91) (actual time=0.073..4,694.679 rows=253,023 loops=1)

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

Hash Left Join (cost=3.82..20,315.89 rows=245,469 width=95) (actual time=0.040..161.424 rows=245,439 loops=1)

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

Seq Scan on bo_instance i (cost=0.00..19,634.00 rows=245,469 width=86) (actual time=0.006..101.487 rows=245,439 loops=1)

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

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

10. 736.305 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.012 0.012 ↑ 1.0 79 1

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

Planning time : 0.322 ms
Execution time : 5,382.989 ms