explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lg6X

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 166,626.253 ↓ 0.0 0 1

Limit (cost=0.84..20.07 rows=1 width=164) (actual time=166,626.252..166,626.253 rows=0 loops=1)

2. 177.089 166,626.251 ↓ 0.0 0 1

GroupAggregate (cost=0.84..497,668.15 rows=25,880 width=164) (actual time=166,626.251..166,626.251 rows=0 loops=1)

  • Group Key: a0_.id
  • Filter: (count(b1_.id) > a0_.knowneventcount)
  • Rows Removed by Filter: 74304
3. 112.747 166,449.162 ↑ 1.3 290,784 1

Nested Loop Left Join (cost=0.84..494,856.54 rows=368,219 width=168) (actual time=0.317..166,449.162 rows=290,784 loops=1)

4. 34,892.639 34,892.639 ↑ 1.0 74,304 1

Index Scan Backward using assignment_pkey on assignment a0_ (cost=0.42..111,494.17 rows=77,641 width=164) (actual time=0.012..34,892.639 rows=74,304 loops=1)

5. 131,443.776 131,443.776 ↑ 1.2 4 74,304

Index Scan using idx_84f3127cd19302f8 on bufferedevent b1_ (cost=0.42..4.89 rows=5 width=8) (actual time=0.629..1.769 rows=4 loops=74,304)

  • Index Cond: (a0_.id = assignment_id)
  • Filter: ((discr)::text = ANY ('{logbase_picking_finished,logbase_packing_finished,package_ordered_1,logbase_order_packing_completed,stock_virtually_transferred_1}'::text[]))
Planning time : 6.783 ms
Execution time : 166,629.821 ms