explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ajv

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,446.084 ↓ 0.0 0 1

Nested Loop (cost=48,082.97..61,719.25 rows=1 width=528) (actual time=1,446.084..1,446.084 rows=0 loops=1)

2. 0.000 1,446.084 ↓ 0.0 0 1

Nested Loop (cost=48,082.68..61,718.67 rows=1 width=507) (actual time=1,446.084..1,446.084 rows=0 loops=1)

3. 1.041 1,446.084 ↓ 0.0 0 1

Nested Loop (cost=48,082.55..61,718.51 rows=1 width=475) (actual time=1,446.084..1,446.084 rows=0 loops=1)

4. 0.618 1,445.043 ↓ 3,002.0 3,002 1

Nested Loop (cost=48,082.27..61,718.20 rows=1 width=424) (actual time=1,222.152..1,445.043 rows=3,002 loops=1)

5. 5.299 1,425.159 ↓ 3,211.0 3,211 1

Hash Join (cost=48,081.99..61,717.87 rows=1 width=420) (actual time=1,222.126..1,425.159 rows=3,211 loops=1)

  • Hash Cond: (mrp_bom_line_to_purchase_order_line.status_id = purchasing_ui_status.id)
6. 15.016 1,419.842 ↓ 1.5 49,121 1

Hash Join (cost=48,080.92..61,592.45 rows=33,158 width=318) (actual time=1,222.090..1,419.842 rows=49,121 loops=1)

  • Hash Cond: (mrp_bom_line.formula_id = product_formula_type.id)
7. 15.115 1,404.814 ↓ 1.5 49,121 1

Hash Join (cost=48,079.76..61,135.37 rows=33,158 width=290) (actual time=1,222.062..1,404.814 rows=49,121 loops=1)

  • Hash Cond: (mrp_bom_line.product_uom = product_uom.id)
8. 16.382 1,389.683 ↓ 1.5 49,121 1

Hash Join (cost=48,078.18..60,677.86 rows=33,158 width=289) (actual time=1,222.026..1,389.683 rows=49,121 loops=1)

  • Hash Cond: (mrp_bom_line.vendor = res_partner.id)
9. 19.294 1,366.775 ↓ 1.4 49,149 1

Hash Join (cost=46,380.85..58,517.13 rows=35,151 width=268) (actual time=1,215.406..1,366.775 rows=49,149 loops=1)

  • Hash Cond: (mrp_bom_line.product_id = product_product.id)
10. 113.726 1,344.469 ↓ 1.6 71,087 1

Hash Join (cost=46,058.91..57,681.45 rows=43,263 width=260) (actual time=1,212.301..1,344.469 rows=71,087 loops=1)

  • Hash Cond: (mrp_bom_line_to_purchase_order_line.mrp_bom_line_id = mrp_bom_line.id)
11. 18.818 18.818 ↑ 1.2 71,087 1

Seq Scan on mrp_bom_line_to_purchase_order_line (cost=0.00..2,341.39 rows=88,139 width=163) (actual time=0.009..18.818 rows=71,087 loops=1)

12. 205.384 1,211.925 ↓ 1.3 357,330 1

Hash (cost=38,164.42..38,164.42 rows=280,679 width=101) (actual time=1,211.925..1,211.925 rows=357,330 loops=1)

  • Buckets: 32,768 Batches: 16 Memory Usage: 3,432kB
13. 233.764 1,006.541 ↓ 1.3 357,330 1

Nested Loop (cost=0.99..38,164.42 rows=280,679 width=101) (actual time=0.039..1,006.541 rows=357,330 loops=1)

14. 3.987 31.172 ↓ 1.0 8,935 1

Merge Join (cost=0.57..1,276.57 rows=8,933 width=11) (actual time=0.025..31.172 rows=8,935 loops=1)

  • Merge Cond: (ews_mrp_job_orders.id = mrp_bom.job_id)
15. 4.034 4.034 ↑ 1.0 2,474 1

Index Scan using ews_mrp_job_orders_pkey on ews_mrp_job_orders (cost=0.28..195.39 rows=2,474 width=9) (actual time=0.011..4.034 rows=2,474 loops=1)

16. 23.151 23.151 ↑ 2.0 8,936 1

Index Scan using mrp_bom_job_id_index on mrp_bom (cost=0.29..1,962.27 rows=18,199 width=10) (actual time=0.010..23.151 rows=8,936 loops=1)

17. 741.605 741.605 ↑ 1.2 40 8,935

Index Scan using mrp_bom_line_bom_id_index on mrp_bom_line (cost=0.42..3.64 rows=49 width=98) (actual time=0.032..0.083 rows=40 loops=8,935)

  • Index Cond: (bom_id = mrp_bom.id)
18. 1.250 3.012 ↓ 1.0 6,273 1

Hash (cost=244.75..244.75 rows=6,175 width=8) (actual time=3.012..3.012 rows=6,273 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 323kB
19. 1.762 1.762 ↓ 1.0 6,273 1

Seq Scan on product_product (cost=0.00..244.75 rows=6,175 width=8) (actual time=0.004..1.762 rows=6,273 loops=1)

20. 2.359 6.526 ↓ 1.0 10,229 1

Hash (cost=1,570.48..1,570.48 rows=10,148 width=21) (actual time=6.526..6.526 rows=10,229 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 683kB
21. 4.167 4.167 ↓ 1.0 10,229 1

Seq Scan on res_partner (cost=0.00..1,570.48 rows=10,148 width=21) (actual time=0.003..4.167 rows=10,229 loops=1)

22. 0.008 0.016 ↑ 1.0 26 1

Hash (cost=1.26..1.26 rows=26 width=9) (actual time=0.016..0.016 rows=26 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
23. 0.008 0.008 ↑ 1.0 26 1

Seq Scan on product_uom (cost=0.00..1.26 rows=26 width=9) (actual time=0.002..0.008 rows=26 loops=1)

24. 0.009 0.012 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=36) (actual time=0.012..0.012 rows=7 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
25. 0.003 0.003 ↑ 1.0 7 1

Seq Scan on product_formula_type (cost=0.00..1.07 rows=7 width=36) (actual time=0.002..0.003 rows=7 loops=1)

26. 0.008 0.018 ↓ 1.3 4 1

Hash (cost=1.03..1.03 rows=3 width=106) (actual time=0.018..0.018 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
27. 0.010 0.010 ↓ 1.3 4 1

Seq Scan on purchasing_ui_status (cost=0.00..1.03 rows=3 width=106) (actual time=0.010..0.010 rows=4 loops=1)

28. 19.266 19.266 ↑ 1.0 1 3,211

Index Scan using index_vendor_material_product_id on vendor_material (cost=0.29..0.33 rows=1 width=20) (actual time=0.004..0.006 rows=1 loops=3,211)

  • Index Cond: (product_id = mrp_bom_line.product_id)
  • Filter: (mrp_bom_line.vendor = vendor_id)
  • Rows Removed by Filter: 7
29. 0.000 0.000 ↓ 0.0 0 3,002

Index Scan using hr_employee_pkey on hr_employee (cost=0.28..0.30 rows=1 width=51) (actual time=0.000..0.000 rows=0 loops=3,002)

  • Index Cond: (id = mrp_bom_line_to_purchase_order_line.purchaser_id)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using purchase_ship_via_id on purchase_ship_via (cost=0.14..0.15 rows=1 width=36) (never executed)

  • Index Cond: (id = mrp_bom_line_to_purchase_order_line.ship_via_id)
31. 0.000 0.000 ↓ 0.0 0

Index Scan using res_partner_pkey on res_partner respartner (cost=0.29..0.32 rows=1 width=21) (never executed)

  • Index Cond: (id = mrp_bom_line_to_purchase_order_line.ship_to_id)
Planning time : 6.959 ms
Execution time : 1,446.545 ms