explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Xc8Q

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.014 0.116 ↑ 1.0 1 1

GroupAggregate (cost=24.97..25.00 rows=1 width=44) (actual time=0.116..0.116 rows=1 loops=1)

  • Group Key: stock_move.product_id, stock_move.product_uom
2. 0.016 0.102 ↑ 1.0 1 1

Sort (cost=24.97..24.98 rows=1 width=12) (actual time=0.102..0.102 rows=1 loops=1)

  • Sort Key: stock_move.product_uom
  • Sort Method: quicksort Memory: 25kB
3. 0.011 0.086 ↑ 1.0 1 1

Nested Loop (cost=0.56..24.96 rows=1 width=12) (actual time=0.045..0.086 rows=1 loops=1)

4. 0.045 0.045 ↓ 3.0 3 1

Index Scan using stock_move_product_id_index on stock_move (cost=0.28..16.65 rows=1 width=16) (actual time=0.026..0.045 rows=3 loops=1)

  • Index Cond: (product_id = 25201)
  • Filter: (((state)::text = ANY ('{confirmed,waiting,assigned}'::text[])) AND (location_id = ANY ('{21,56,25,26}'::integer[])) AND (location_dest_id <> ALL ('{21,56,25,26}'::integer[])))
  • Rows Removed by Filter: 3
5. 0.030 0.030 ↓ 0.0 0 3

Index Scan using stock_picking_pkey on stock_picking sp (cost=0.28..8.30 rows=1 width=4) (actual time=0.009..0.010 rows=0 loops=3)

  • Index Cond: (id = stock_move.picking_id)
  • Filter: ((purchase_id IS NULL) AND ((type)::text = 'internal'::text))
  • Rows Removed by Filter: 1