explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BoxB

Settings
# exclusive inclusive rows x rows loops node
1. 0.206 8.186 ↑ 14.6 110 1

Nested Loop (cost=139.50..25,033.30 rows=1,610 width=177) (actual time=2.656..8.186 rows=110 loops=1)

2. 0.155 7.320 ↑ 14.7 110 1

Nested Loop (cost=139.07..24,284.60 rows=1,612 width=181) (actual time=2.635..7.320 rows=110 loops=1)

3. 0.125 6.505 ↑ 14.7 110 1

Hash Join (cost=138.64..22,678.11 rows=1,612 width=181) (actual time=2.620..6.505 rows=110 loops=1)

  • Hash Cond: (cs4.parent_category_sap_id = cs3.category_sap_id)
4. 0.145 5.185 ↑ 14.7 110 1

Hash Join (cost=70.18..22,587.48 rows=1,613 width=151) (actual time=1.385..5.185 rows=110 loops=1)

  • Hash Cond: (prod.category_sap_id = cs4.category_sap_id)
5. 0.135 3.930 ↑ 14.7 110 1

Nested Loop (cost=1.72..22,496.84 rows=1,613 width=117) (actual time=0.241..3.930 rows=110 loops=1)

6. 0.525 3.135 ↑ 14.7 110 1

Nested Loop (cost=1.29..21,759.67 rows=1,613 width=56) (actual time=0.230..3.135 rows=110 loops=1)

7. 0.193 1.191 ↑ 23.9 473 1

Nested Loop (cost=0.86..15,554.61 rows=11,301 width=52) (actual time=0.062..1.191 rows=473 loops=1)

8. 0.053 0.053 ↑ 19.1 21 1

Index Scan using fki_order_order_status_id_fkey on "order" o (cost=0.42..677.76 rows=402 width=8) (actual time=0.014..0.053 rows=21 loops=1)

  • Index Cond: (order_status_id = 22)
9. 0.945 0.945 ↑ 4.8 23 21

Index Scan using fki_position_order_id_fkey on "position" p (cost=0.44..35.90 rows=111 width=48) (actual time=0.010..0.045 rows=23 loops=21)

  • Index Cond: (order_id = o.order_id)
  • Filter: (picked_cnt <> sold_cnt)
  • Rows Removed by Filter: 1
10. 1.419 1.419 ↓ 0.0 0 473

Index Scan using fki_position_to_su_position_id_fkey on position_to_su pts (cost=0.43..0.51 rows=4 width=12) (actual time=0.003..0.003 rows=0 loops=473)

  • Index Cond: (position_id = p.position_id)
11. 0.660 0.660 ↑ 1.0 1 110

Index Scan using product_pkey on product prod (cost=0.42..0.45 rows=1 width=69) (actual time=0.005..0.006 rows=1 loops=110)

  • Index Cond: (product_id = p.product_id)
12. 0.611 1.110 ↑ 1.0 1,528 1

Hash (cost=48.76..48.76 rows=1,576 width=38) (actual time=1.110..1.110 rows=1,528 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 125kB
13. 0.499 0.499 ↑ 1.0 1,528 1

Seq Scan on category_sap cs4 (cost=0.00..48.76 rows=1,576 width=38) (actual time=0.006..0.499 rows=1,528 loops=1)

14. 0.600 1.195 ↑ 1.0 1,528 1

Hash (cost=48.76..48.76 rows=1,576 width=34) (actual time=1.195..1.195 rows=1,528 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
15. 0.595 0.595 ↑ 1.0 1,528 1

Seq Scan on category_sap cs3 (cost=0.00..48.76 rows=1,576 width=34) (actual time=0.009..0.595 rows=1,528 loops=1)

16. 0.660 0.660 ↑ 1.0 1 110

Index Scan using su_pkey on su (cost=0.43..0.99 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=110)

  • Index Cond: (su_id = pts.su_id)
17. 0.660 0.660 ↑ 1.0 1 110

Index Scan using shipment_pkey on shipment ship (cost=0.43..0.45 rows=1 width=12) (actual time=0.005..0.006 rows=1 loops=110)

  • Index Cond: (shipment_id = su.shipment_id)
Planning time : 4.278 ms
Execution time : 8.550 ms