explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rEi5

Settings
# exclusive inclusive rows x rows loops node
1. 0.043 0.301 ↑ 1.0 1 1

GroupAggregate (cost=33.29..33.31 rows=1 width=40) (actual time=0.300..0.301 rows=1 loops=1)

  • Group Key: pp.id, sm.product_uom
2. 0.055 0.258 ↑ 1.0 1 1

Sort (cost=33.29..33.29 rows=1 width=12) (actual time=0.257..0.258 rows=1 loops=1)

  • Sort Key: sm.product_uom
  • Sort Method: quicksort Memory: 25kB
3. 0.003 0.203 ↑ 1.0 1 1

Nested Loop (cost=0.85..33.28 rows=1 width=12) (actual time=0.160..0.203 rows=1 loops=1)

4. 0.007 0.083 ↑ 1.0 1 1

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

5. 0.046 0.046 ↓ 3.0 3 1

Index Scan using stock_move_product_id_index on stock_move sm (cost=0.28..16.65 rows=1 width=16) (actual time=0.026..0.046 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
6. 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.010..0.010 rows=0 loops=3)

  • Index Cond: (id = sm.picking_id)
  • Filter: ((purchase_id IS NULL) AND ((type)::text = 'internal'::text))
  • Rows Removed by Filter: 1
7. 0.117 0.117 ↑ 1.0 1 1

Index Only Scan using product_product_pkey on product_product pp (cost=0.29..8.30 rows=1 width=4) (actual time=0.115..0.117 rows=1 loops=1)

  • Index Cond: (id = 25201)
  • Heap Fetches: 1