explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PPPs

Settings
# exclusive inclusive rows x rows loops node
1. 0.076 4,404.783 ↑ 1.0 800 1

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

2. 77.198 4,404.707 ↑ 310.2 800 1

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

3. 315.260 4,327.509 ↓ 1.0 248,197 1

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

  • Group Key: i.id, boc.id
4. 124.489 4,012.249 ↓ 1.0 255,781 1

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

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

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

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

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

  • Hash Cond: (i.bo_class_id = boc.id)
7. 74.625 74.625 ↓ 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.010..74.625 rows=248,197 loops=1)

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

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

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

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

10. 744.560 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.031 0.031 ↑ 1.0 79 1

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

  • Filter: (NOT is_deleted)
Planning time : 0.701 ms
Execution time : 4,411.405 ms