explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Z6UH

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 4,231.623 ↑ 1.0 200 1

Limit (cost=1,070,136.60..1,070,146.60 rows=200 width=122) (actual time=4,231.582..4,231.623 rows=200 loops=1)

2. 72.752 4,231.611 ↑ 3,644.1 200 1

WindowAgg (cost=1,070,136.60..1,106,577.55 rows=728,819 width=122) (actual time=4,231.581..4,231.611 rows=200 loops=1)

3. 295.059 4,158.859 ↑ 3.0 245,439 1

GroupAggregate (cost=1,070,136.60..1,090,179.12 rows=728,819 width=114) (actual time=3,838.574..4,158.859 rows=245,439 loops=1)

  • Group Key: i.id, boc.id
4. 117.159 3,863.800 ↑ 2.9 253,023 1

Sort (cost=1,070,136.60..1,071,958.65 rows=728,819 width=91) (actual time=3,838.558..3,863.800 rows=253,023 loops=1)

  • Sort Key: i.id, boc.id
  • Sort Method: external merge Disk: 24256kB
5. 2,849.532 3,746.641 ↑ 2.9 253,023 1

Nested Loop Left Join (cost=3.82..924,428.12 rows=728,819 width=91) (actual time=0.119..3,746.641 rows=253,023 loops=1)

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

Hash Left Join (cost=3.82..60,775.62 rows=728,819 width=114) (actual time=0.079..160.792 rows=245,439 loops=1)

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

Seq Scan on bo_instance i (cost=0.00..58,758.54 rows=728,819 width=105) (actual time=0.011..117.828 rows=245,439 loops=1)

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

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

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

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

10. 736.299 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.018 0.018 ↑ 1.0 79 1

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

  • Filter: (NOT is_deleted)
Planning time : 0.712 ms
Execution time : 4,237.642 ms