explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ovuJ

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

Limit (cost=349,610.59..349,650.59 rows=800 width=122) (actual time=4,607.053..4,607.199 rows=800 loops=1)

2. 83.568 4,607.162 ↑ 310.2 800 1

WindowAgg (cost=349,610.59..362,019.79 rows=248,184 width=122) (actual time=4,607.052..4,607.162 rows=800 loops=1)

3. 343.113 4,523.594 ↓ 1.0 248,197 1

GroupAggregate (cost=349,610.59..356,435.65 rows=248,184 width=114) (actual time=4,149.246..4,523.594 rows=248,197 loops=1)

  • Group Key: i.id, boc.id
4. 137.072 4,180.481 ↓ 1.0 255,781 1

Sort (cost=349,610.59..350,231.05 rows=248,184 width=91) (actual time=4,149.180..4,180.481 rows=255,781 loops=1)

  • Sort Key: i.id, boc.id
  • Sort Method: external merge Disk: 24544kB
5. 3,159.224 4,043.409 ↓ 1.0 255,781 1

Nested Loop Left Join (cost=3.82..314,646.00 rows=248,184 width=91) (actual time=0.070..4,043.409 rows=255,781 loops=1)

  • Join Filter: (i.tags @> ARRAY[t.id])
  • Rows Removed by Join Filter: 19595905
6. 51.798 139.594 ↓ 1.0 248,197 1

Hash Left Join (cost=3.82..20,545.97 rows=248,184 width=95) (actual time=0.042..139.594 rows=248,197 loops=1)

  • Hash Cond: (i.bo_class_id = boc.id)
7. 87.764 87.764 ↓ 1.0 248,197 1

Seq Scan on bo_instance i (cost=0.00..19,856.58 rows=248,184 width=86) (actual time=0.005..87.764 rows=248,197 loops=1)

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

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

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

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

10. 744.580 744.591 ↑ 1.0 79 248,197

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

11. 0.011 0.011 ↑ 1.0 79 1

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

Planning time : 0.285 ms
Execution time : 4,613.546 ms