explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XYtF

Settings
# exclusive inclusive rows x rows loops node
1. 1,105.372 1,238.350 ↓ 0.0 0 1

Update on outputs o (cost=19,896.69..31,976.78 rows=1,510 width=349) (actual time=1,238.35..1,238.35 rows=0 loops=1)

2. 16.555 132.978 ↓ 8.7 13,082 1

Nested Loop (cost=19,896.69..31,976.78 rows=1,510 width=349) (actual time=36.805..132.978 rows=13,082 loops=1)

3. 7.220 77.159 ↓ 8.7 13,088 1

Subquery Scan on allocation_select (cost=19,896.26..19,994.41 rows=1,510 width=360) (actual time=36.793..77.159 rows=13,088 loops=1)

4. 31.372 69.939 ↓ 8.7 13,088 1

Aggregate (cost=19,896.26..19,979.31 rows=1,510 width=168) (actual time=36.786..69.939 rows=13,088 loops=1)

5. 5.295 38.567 ↓ 9.2 13,886 1

Sort (cost=19,896.26..19,900.03 rows=1,510 width=24) (actual time=36.77..38.567 rows=13,886 loops=1)

  • Sort Key: aa.output_id
  • Sort Method: quicksort Memory: 1,469kB
6. 0.000 33.272 ↓ 9.2 13,886 1

Nested Loop (cost=38.97..19,816.53 rows=1,510 width=24) (actual time=3.602..33.272 rows=13,886 loops=1)

7. 4.197 7.669 ↓ 7.5 13,633 1

Bitmap Heap Scan on outputs oo (cost=38.54..5,871.97 rows=1,821 width=8) (actual time=3.591..7.669 rows=13,633 loops=1)

  • Heap Blocks: exact=909
8. 3.472 3.472 ↓ 36.5 66,404 1

Bitmap Index Scan on stock_outputs_product_code_idx (cost=0..38.09 rows=1,821 width=0) (actual time=3.472..3.472 rows=66,404 loops=1)

  • Index Cond: (product_code = 312)
9. 27.266 27.266 ↑ 1.0 1 13,633

Index Scan using stock_allocations_output_id_idx on allocations aa (cost=0.43..7.65 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=13,633)

  • Index Cond: (output_id = oo.id)
10. 39.264 39.264 ↑ 1.0 1 13,088

Index Scan using outputs_pkey on outputs o (cost=0.43..7.92 rows=1 width=77) (actual time=0.003..0.003 rows=1 loops=13,088)

  • Index Cond: (id = allocation_select.output_id)
  • Filter: (NOT has_custom_value)
Planning time : 0.476 ms
Execution time : 1,238.799 ms