explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J76w

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 487.510 ↓ 0.0 0 1

Limit (cost=343,153.50..343,153.50 rows=1 width=498) (actual time=487.510..487.510 rows=0 loops=1)

  • Buffers: shared hit=285589
2. 0.008 487.508 ↓ 0.0 0 1

Sort (cost=343,153.50..343,153.50 rows=1 width=498) (actual time=487.508..487.508 rows=0 loops=1)

  • Sort Key: order2_.documentno
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=285589
3. 0.001 487.500 ↓ 0.0 0 1

Nested Loop (cost=4.49..343,153.49 rows=1 width=498) (actual time=487.500..487.500 rows=0 loops=1)

  • Buffers: shared hit=285589
4. 0.000 487.499 ↓ 0.0 0 1

Nested Loop (cost=3.93..341,680.91 rows=1 width=507) (actual time=487.499..487.499 rows=0 loops=1)

  • Buffers: shared hit=285589
5. 0.001 487.499 ↓ 0.0 0 1

Nested Loop Left Join (cost=3.37..341,672.51 rows=1 width=517) (actual time=487.499..487.499 rows=0 loops=1)

  • Join Filter: ((location5_.c_country_id)::text = (country6_.c_country_id)::text)
  • Buffers: shared hit=285589
6. 0.000 487.498 ↓ 0.0 0 1

Nested Loop Left Join (cost=3.37..341,662.11 rows=1 width=510) (actual time=487.498..487.498 rows=0 loops=1)

  • Buffers: shared hit=285589
7. 0.000 487.498 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.81..341,654.96 rows=1 width=456) (actual time=487.498..487.498 rows=0 loops=1)

  • Buffers: shared hit=285589
8. 0.001 487.498 ↓ 0.0 0 1

Nested Loop (cost=2.25..341,646.39 rows=1 width=456) (actual time=487.498..487.498 rows=0 loops=1)

  • Buffers: shared hit=285589
9. 0.000 487.497 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.69..341,637.83 rows=1 width=428) (actual time=487.497..487.497 rows=0 loops=1)

  • Join Filter: ((product1_.m_brand_id)::text = (brand7_.m_brand_id)::text)
  • Buffers: shared hit=285589
10. 0.000 487.497 ↓ 0.0 0 1

Nested Loop (cost=1.69..341,596.26 rows=1 width=454) (actual time=487.497..487.497 rows=0 loops=1)

  • Buffers: shared hit=285589
11. 28.237 487.497 ↓ 0.0 0 1

Nested Loop (cost=1.13..341,588.33 rows=1 width=359) (actual time=487.497..487.497 rows=0 loops=1)

  • Buffers: shared hit=285589
12. 237.722 237.722 ↓ 2.4 36,923 1

Index Scan using em_obpos_canbedelivered on c_orderline orderline0_ (cost=0.57..208,945.26 rows=15,558 width=245) (actual time=0.084..237.722 rows=36,923 loops=1)

  • Index Cond: ((em_obpos_canbedelivered = 'Y'::bpchar) AND ((ad_org_id)::text = 'C459182BF30B46FEAF1C91DE123CDB99'::text))
  • Filter: (((em_obwpl_readypl IS NULL) OR (em_obwpl_readypl = 'N'::bpchar)) AND ((em_obrdc_delivery_condition)::text <> ALL ('{PickAndCarry,BUTECOM_PFL}'::text[])) AND (((qtyordered - qtydelivered) - em_obwpl_qtyinpicking) > '0'::numeric))
  • Rows Removed by Filter: 165588
  • Buffers: shared hit=100388
13. 221.538 221.538 ↓ 0.0 0 36,923

Index Scan using c_order_key on c_order order2_ (cost=0.56..8.52 rows=1 width=147) (actual time=0.006..0.006 rows=0 loops=36,923)

  • Index Cond: ((c_order_id)::text = (orderline0_.c_order_id)::text)
  • Filter: ((em_obpos_applications_id IS NOT NULL) AND (em_obwpl_readypl <> 'Y'::bpchar) AND ((docstatus)::text = 'CO'::text) AND (em_obpos_isdeleted = 'N'::bpchar) AND (em_obpos_islayaway = 'N'::bpchar) AND (upper((documentno)::text) ~~ '%20693%'::text) AND ((c_doctypetarget_id)::text = ANY ('{4F94921D217F48A993FE766B8334B936,7CE7854395964A60A29EB3C5B7D46B40,116D158017A74901960473E3231FF91F,D457B6F9629240058922D59065FCC63A,D14BC7AD73FB4DD0B815E52DE3B31DFE,7C03FC3EE0FF40EEB1C07283E60E57F8,6BC35B437FF546299164FEEE30B3E950,2B0E8C61AD624AD291CE1D04384128DD}'::text[])))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=185201
14. 0.000 0.000 ↓ 0.0 0

Index Scan using m_product_key on m_product product1_ (cost=0.56..7.93 rows=1 width=128) (never executed)

  • Index Cond: ((m_product_id)::text = (orderline0_.m_product_id)::text)
  • Filter: ((producttype)::text = 'I'::text)
15. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_brand brand7_ (cost=0.00..29.03 rows=1,003 width=40) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Index Scan using c_bpartner_key on c_bpartner businesspa3_ (cost=0.56..8.55 rows=1 width=61) (never executed)

  • Index Cond: ((c_bpartner_id)::text = (order2_.c_bpartner_id)::text)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using c_bpartner_location_key on c_bpartner_location businesspa4_ (cost=0.56..8.56 rows=1 width=66) (never executed)

  • Index Cond: ((order2_.c_bpartner_location_id)::text = (c_bpartner_location_id)::text)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using c_location_key on c_location location5_ (cost=0.56..7.14 rows=1 width=87) (never executed)

  • Index Cond: ((businesspa4_.c_location_id)::text = (c_location_id)::text)
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on c_country country6_ (cost=0.00..7.40 rows=240 width=15) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Index Scan using ad_user_key on ad_user aduser21_ (cost=0.56..8.39 rows=1 width=56) (never executed)

  • Index Cond: ((ad_user_id)::text = (orderline0_.createdby)::text)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using ad_user_key on ad_user aduser22_ (cost=0.56..8.39 rows=1 width=56) (never executed)

  • Index Cond: ((ad_user_id)::text = (orderline0_.updatedby)::text)
22.          

SubPlan (forNested Loop)

23. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=2.11..171.08 rows=1 width=0) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.54..162.48 rows=1 width=33) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.98..154.08 rows=1 width=99) (never executed)

26. 0.000 0.000 ↓ 0.0 0

Index Scan using c_orderline_servrel_relord_idx on c_orderline_servicerelation orderlines10_ (cost=0.56..52.77 rows=12 width=66) (never executed)

  • Index Cond: ((c_orderline_related_id)::text = (orderline0_.c_orderline_id)::text)
27. 0.000 0.000 ↓ 0.0 0

Index Only Scan using obre_reservation_cordline_idx on obre_reservation obre_reser8_ (cost=0.41..8.43 rows=1 width=33) (never executed)

  • Index Cond: (c_orderline_id = (orderlines10_.c_orderline_id)::text)
  • Heap Fetches: 0
28. 0.000 0.000 ↓ 0.0 0

Index Only Scan using c_orderline_key on c_orderline orderline9_ (cost=0.57..8.40 rows=1 width=33) (never executed)

  • Index Cond: (c_orderline_id = (obre_reser8_.c_orderline_id)::text)
  • Heap Fetches: 0
29. 0.000 0.000 ↓ 0.0 0

Index Only Scan using c_orderline_key on c_orderline orderline11_ (cost=0.57..8.59 rows=1 width=33) (never executed)

  • Index Cond: (c_orderline_id = (orderline0_.c_orderline_id)::text)
  • Heap Fetches: 0
30. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.26..25.34 rows=1 width=13) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.83..16.89 rows=1 width=33) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Index Scan using em_butintp_ch_name_client on m_characteristic characteri14_ (cost=0.28..8.30 rows=1 width=33) (never executed)

  • Index Cond: ((name)::text = 'Produit.RefFournisseur'::text)
  • Filter: ((name)::text ~~ 'Produit.RefFournisseur'::text)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using em_repdf_product_ch_rep on m_product_ch_value productcha12_ (cost=0.56..8.58 rows=1 width=66) (never executed)

  • Index Cond: (((m_product_id)::text = (product1_.m_product_id)::text) AND ((m_characteristic_id)::text = (characteri14_.m_characteristic_id)::text))
34. 0.000 0.000 ↓ 0.0 0

Index Scan using m_ch_value_key on m_ch_value characteri13_ (cost=0.42..8.44 rows=1 width=46) (never executed)

  • Index Cond: ((m_ch_value_id)::text = (productcha12_.m_ch_value_id)::text)
35. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.26..25.34 rows=1 width=13) (never executed)

36. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.83..16.89 rows=1 width=33) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Index Scan using em_butintp_ch_name_client on m_characteristic characteri17_ (cost=0.28..8.30 rows=1 width=33) (never executed)

  • Index Cond: ((name)::text = 'Produit.Fournisseur'::text)
  • Filter: ((name)::text ~~ 'Produit.Fournisseur'::text)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using em_repdf_product_ch_rep on m_product_ch_value productcha15_ (cost=0.56..8.58 rows=1 width=66) (never executed)

  • Index Cond: (((m_product_id)::text = (product1_.m_product_id)::text) AND ((m_characteristic_id)::text = (characteri17_.m_characteristic_id)::text))
39. 0.000 0.000 ↓ 0.0 0

Index Scan using m_ch_value_key on m_ch_value characteri16_ (cost=0.42..8.44 rows=1 width=46) (never executed)

  • Index Cond: ((m_ch_value_id)::text = (productcha15_.m_ch_value_id)::text)
40. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.26..25.34 rows=1 width=13) (never executed)

41. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.83..16.89 rows=1 width=33) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Index Scan using em_butintp_ch_name_client on m_characteristic characteri20_ (cost=0.28..8.30 rows=1 width=33) (never executed)

  • Index Cond: ((name)::text = 'Colis.Nombre de colis'::text)
  • Filter: ((name)::text ~~ 'Colis.Nombre de colis'::text)
43. 0.000 0.000 ↓ 0.0 0

Index Scan using em_repdf_product_ch_rep on m_product_ch_value productcha18_ (cost=0.56..8.58 rows=1 width=66) (never executed)

  • Index Cond: (((m_product_id)::text = (product1_.m_product_id)::text) AND ((m_characteristic_id)::text = (characteri20_.m_characteristic_id)::text))
44. 0.000 0.000 ↓ 0.0 0

Index Scan using m_ch_value_key on m_ch_value characteri19_ (cost=0.42..8.44 rows=1 width=46) (never executed)

  • Index Cond: ((m_ch_value_id)::text = (productcha18_.m_ch_value_id)::text)
45. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=247.29..247.31 rows=1 width=20) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=2.25..247.26 rows=12 width=20) (never executed)

47. 0.000 0.000 ↓ 0.0 0

Index Only Scan using c_orderline_key on c_orderline orderline26_ (cost=0.57..8.59 rows=1 width=33) (never executed)

  • Index Cond: (c_orderline_id = (orderline0_.c_orderline_id)::text)
  • Heap Fetches: 0
48. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.68..238.56 rows=12 width=53) (never executed)

49. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.13..155.91 rows=12 width=66) (never executed)

50. 0.000 0.000 ↓ 0.0 0

Index Scan using c_orderline_servrel_relord_idx on c_orderline_servicerelation orderlines23_ (cost=0.56..52.77 rows=12 width=66) (never executed)

  • Index Cond: ((c_orderline_related_id)::text = (orderline0_.c_orderline_id)::text)
51. 0.000 0.000 ↓ 0.0 0

Index Scan using c_orderline_key on c_orderline orderline24_ (cost=0.57..8.59 rows=1 width=66) (never executed)

  • Index Cond: ((c_orderline_id)::text = (orderlines23_.c_orderline_id)::text)
52. 0.000 0.000 ↓ 0.0 0

Index Scan using m_product_key on m_product product25_ (cost=0.56..6.88 rows=1 width=53) (never executed)

  • Index Cond: ((m_product_id)::text = (orderline24_.m_product_id)::text)
53. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.58..8.59 rows=1 width=11) (never executed)

54. 0.000 0.000 ↓ 0.0 0

Index Scan using ad_user_partner on ad_user aduser27_ (cost=0.56..8.58 rows=1 width=11) (never executed)

  • Index Cond: ((c_bpartner_id)::text = (businesspa3_.c_bpartner_id)::text)
  • Filter: (isactive = 'Y'::bpchar)
55. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.56..14.11 rows=1 width=10) (never executed)

56. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.56..10.88 rows=1 width=16) (never executed)

  • Join Filter: ((businesspa28_.c_greeting_id)::text = (greetingtr30_.c_greeting_id)::text)
57. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.56..9.69 rows=1 width=66) (never executed)

  • Join Filter: ((businesspa28_.c_greeting_id)::text = (greeting29_.c_greeting_id)::text)
58. 0.000 0.000 ↓ 0.0 0

Index Scan using c_bpartner_key on c_bpartner businesspa28_ (cost=0.56..8.58 rows=1 width=33) (never executed)

  • Index Cond: ((businesspa3_.c_bpartner_id)::text = (c_bpartner_id)::text)
59. 0.000 0.000 ↓ 0.0 0

Seq Scan on c_greeting greeting29_ (cost=0.00..1.05 rows=5 width=33) (never executed)

60. 0.000 0.000 ↓ 0.0 0

Seq Scan on c_greeting_trl greetingtr30_ (cost=0.00..1.12 rows=5 width=49) (never executed)

  • Filter: ((ad_language)::text = 'fr_FR'::text)
61. 0.000 0.000 ↓ 0.0 0

Seq Scan on ad_language adlanguage31_ (cost=0.00..3.23 rows=1 width=6) (never executed)

  • Filter: ((ad_language)::text = 'fr_FR'::text)
62. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=473.52..473.53 rows=1 width=12) (never executed)

  • Group Key: fin_paymen35_.amount
63. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.69..473.51 rows=1 width=12) (never executed)

64. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.13..468.22 rows=1 width=45) (never executed)

65. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_paym_sch_ord_idx on fin_payment_schedule fin_paymen35_ (cost=0.56..8.58 rows=1 width=39) (never executed)

  • Index Cond: ((c_order_id)::text = (order2_.c_order_id)::text)
66. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_pay_scheduledetail_or on fin_payment_scheduledetail fin_paymen34_ (cost=0.56..458.53 rows=111 width=72) (never executed)

  • Index Cond: ((fin_payment_schedule_order)::text = (fin_paymen35_.fin_payment_schedule_id)::text)
  • Filter: (fin_payment_detail_id IS NOT NULL)
67. 0.000 0.000 ↓ 0.0 0

Index Only Scan using fin_payment_detail_key on fin_payment_detail fin_paymen37_ (cost=0.56..5.29 rows=1 width=33) (never executed)

  • Index Cond: (fin_payment_detail_id = (fin_paymen34_.fin_payment_detail_id)::text)
  • Heap Fetches: 0
68. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=473.52..473.53 rows=1 width=6) (never executed)

69. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.69..473.51 rows=1 width=6) (never executed)

70. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.13..468.22 rows=1 width=39) (never executed)

71. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_paym_sch_ord_idx on fin_payment_schedule fin_paymen40_ (cost=0.56..8.58 rows=1 width=33) (never executed)

  • Index Cond: ((c_order_id)::text = (order2_.c_order_id)::text)
72. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_pay_scheduledetail_or on fin_payment_scheduledetail fin_paymen39_ (cost=0.56..458.53 rows=111 width=72) (never executed)

  • Index Cond: ((fin_payment_schedule_order)::text = (fin_paymen40_.fin_payment_schedule_id)::text)
  • Filter: (fin_payment_detail_id IS NOT NULL)
73. 0.000 0.000 ↓ 0.0 0

Index Only Scan using fin_payment_detail_key on fin_payment_detail fin_paymen41_ (cost=0.56..5.29 rows=1 width=33) (never executed)

  • Index Cond: (fin_payment_detail_id = (fin_paymen39_.fin_payment_detail_id)::text)
  • Heap Fetches: 0