explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sNBN

Settings
# exclusive inclusive rows x rows loops node
1. 0.081 29.526 ↓ 719.0 719 1

Nested Loop Left Join (cost=180.14..185.88 rows=1 width=18) (actual time=0.485..29.526 rows=719 loops=1)

2. 0.000 25.850 ↓ 719.0 719 1

Nested Loop Left Join (cost=179.85..185.55 rows=1 width=26) (actual time=0.475..25.850 rows=719 loops=1)

3. 0.438 23.711 ↓ 719.0 719 1

Nested Loop Left Join (cost=179.57..184.92 rows=1 width=12) (actual time=0.467..23.711 rows=719 loops=1)

4. 6.377 21.835 ↓ 719.0 719 1

Nested Loop (cost=179.29..184.61 rows=1 width=12) (actual time=0.461..21.835 rows=719 loops=1)

  • Join Filter: (mrp_bom_line.bom_id = ews_mrp_release_orders.bom_id)
  • Rows Removed by Join Filter: 69,024
5. 0.290 6.111 ↓ 719.0 719 1

Nested Loop (cost=1.13..4.21 rows=1 width=20) (actual time=0.065..6.111 rows=719 loops=1)

6. 0.383 3.664 ↓ 719.0 719 1

Nested Loop (cost=0.84..3.89 rows=1 width=12) (actual time=0.055..3.664 rows=719 loops=1)

7. 0.405 0.405 ↓ 719.0 719 1

Index Scan using index_mrp_bom_line_to_purchase_order_line_mrp_legacy on mrp_bom_line_to_purchase_order_line (cost=0.42..1.44 rows=1 width=20) (actual time=0.044..0.405 rows=719 loops=1)

  • Index Cond: (legacy = false)
  • Filter: (NOT legacy)
8. 2.876 2.876 ↑ 1.0 1 719

Index Scan using mrp_bom_line_pkey on mrp_bom_line (cost=0.42..2.44 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=719)

  • Index Cond: (id = mrp_bom_line_to_purchase_order_line.mrp_bom_line_id)
9. 2.157 2.157 ↑ 1.0 1 719

Index Scan using mrp_bom_pkey on mrp_bom (cost=0.29..0.31 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=719)

  • Index Cond: (id = mrp_bom_line.bom_id)
10. 9.060 9.347 ↓ 1.4 97 719

HashAggregate (cost=178.16..178.85 rows=69 width=8) (actual time=0.001..0.013 rows=97 loops=719)

  • Group Key: ews_mrp_release_orders.bom_id, ews_mrp_release_orders.release_state_id
11. 0.287 0.287 ↑ 1.0 180 1

Index Scan using index_ews_mrp_release_orders_release_state_id on ews_mrp_release_orders (cost=0.41..177.23 rows=186 width=8) (actual time=0.016..0.287 rows=180 loops=1)

  • Index Cond: (release_state_id = 3)
12. 1.438 1.438 ↑ 1.0 1 719

Index Scan using ews_mrp_job_orders_pkey on ews_mrp_job_orders (cost=0.28..0.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=719)

  • Index Cond: (mrp_bom.job_id = id)
13. 2.157 2.157 ↑ 1.0 1 719

Index Scan using sale_order_pkey on sale_order (cost=0.29..0.62 rows=1 width=22) (actual time=0.002..0.003 rows=1 loops=719)

  • Index Cond: (id = ews_mrp_job_orders.sale_id)
14. 3.595 3.595 ↑ 1.0 1 719

Index Scan using index_vendor_material_product_id on vendor_material (cost=0.29..0.33 rows=1 width=8) (actual time=0.003..0.005 rows=1 loops=719)

  • Index Cond: (mrp_bom_line.product_id = product_id)
  • Filter: (mrp_bom_line.vendor = vendor_id)
  • Rows Removed by Filter: 5
Planning time : 2.644 ms
Execution time : 29.777 ms