explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0GU6

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 4,662.262 ↑ 1.0 200 1

Limit (cost=360,370.64..360,380.64 rows=200 width=122) (actual time=4,662.221..4,662.262 rows=200 loops=1)

2. 78.916 4,662.247 ↑ 1,218.4 200 1

WindowAgg (cost=360,370.64..372,555.09 rows=243,689 width=122) (actual time=4,662.217..4,662.247 rows=200 loops=1)

3. 324.490 4,583.331 ↓ 1.0 245,439 1

GroupAggregate (cost=360,370.64..367,072.09 rows=243,689 width=114) (actual time=4,228.635..4,583.331 rows=245,439 loops=1)

  • Group Key: i.id, boc.id
4. 177.716 4,258.841 ↓ 1.0 253,023 1

Sort (cost=360,370.64..360,979.86 rows=243,689 width=91) (actual time=4,228.618..4,258.841 rows=253,023 loops=1)

  • Sort Key: i.id, boc.id
  • Sort Method: external merge Disk: 24240kB
5. 3,170.494 4,081.125 ↓ 1.0 253,023 1

Nested Loop Left Join (cost=3.82..326,071.95 rows=243,689 width=91) (actual time=0.320..4,081.125 rows=253,023 loops=1)

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

Hash Left Join (cost=3.82..37,298.50 rows=243,689 width=95) (actual time=0.238..174.314 rows=245,439 loops=1)

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

Seq Scan on bo_instance i (cost=0.00..36,621.52 rows=243,689 width=86) (actual time=0.181..123.978 rows=245,439 loops=1)

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

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

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

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

10. 736.282 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.035 0.035 ↑ 1.0 79 1

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

  • Filter: (NOT is_deleted)
Planning time : 1.154 ms
Execution time : 4,668.802 ms