explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mI71

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 22,227.391 ↓ 12.0 12 1

Limit (cost=700,647.53..700,647.54 rows=1 width=232) (actual time=22,227.389..22,227.391 rows=12 loops=1)

2. 0.576 22,227.389 ↓ 12.0 12 1

Sort (cost=700,647.53..700,647.54 rows=1 width=232) (actual time=22,227.388..22,227.389 rows=12 loops=1)

  • Sort Key: prolprod.em_etn_weborder, fechalanzamientoval.em_etn_idvaluews DESC
  • Sort Method: top-N heapsort Memory: 30kB
3. 29.386 22,226.813 ↓ 119.0 119 1

Nested Loop Semi Join (cost=8,898.64..700,647.52 rows=1 width=232) (actual time=137.147..22,226.813 rows=119 loops=1)

  • Join Filter: ((category.m_product_id)::text = (((SubPlan 1)))::text)
  • Rows Removed by Join Filter: 147,957
4. 0.525 272.272 ↓ 173.0 173 1

Nested Loop (cost=18.97..8,091.82 rows=1 width=364) (actual time=1.151..272.272 rows=173 loops=1)

  • Join Filter: ((category.m_product_id)::text = (prolprod.m_product_id)::text)
5. 0.871 269.749 ↓ 222.0 222 1

Nested Loop Left Join (cost=18.55..8,090.86 rows=1 width=317) (actual time=1.138..269.749 rows=222 loops=1)

  • Join Filter: ((cur.c_currency_id)::text = (pl.c_currency_id)::text)
  • Rows Removed by Join Filter: 222
6. 0.693 268.434 ↓ 222.0 222 1

Nested Loop Left Join (cost=18.55..8,083.92 rows=1 width=395) (actual time=1.133..268.434 rows=222 loops=1)

  • Join Filter: ((pl.m_pricelist_id)::text = (plv.m_pricelist_id)::text)
  • Rows Removed by Join Filter: 666
7. 0.867 267.297 ↓ 222.0 222 1

Nested Loop Left Join (cost=18.55..8,082.50 rows=1 width=395) (actual time=1.129..267.297 rows=222 loops=1)

  • Join Filter: ((plv.m_pricelist_version_id)::text = (etn_pricelist.m_pricelist_version_id)::text)
  • Rows Removed by Join Filter: 666
8. 0.678 266.208 ↓ 222.0 222 1

Nested Loop Left Join (cost=18.55..8,081.07 rows=1 width=395) (actual time=1.125..266.208 rows=222 loops=1)

  • Join Filter: ((prodprice.m_pricelist_version_id)::text = (etn_pricelist.m_pricelist_version_id)::text)
  • Rows Removed by Join Filter: 513
9. 0.559 263.532 ↓ 222.0 222 1

Nested Loop Left Join (cost=18.13..8,073.70 rows=1 width=391) (actual time=1.113..263.532 rows=222 loops=1)

10. 1.501 261.641 ↓ 222.0 222 1

Nested Loop Left Join (cost=18.13..8,072.45 rows=1 width=309) (actual time=1.109..261.641 rows=222 loops=1)

  • Join Filter: ((calibreval.m_ch_value_id)::text = (calibre.m_ch_value_id)::text)
  • Rows Removed by Join Filter: 10,887
11. 0.416 259.252 ↓ 222.0 222 1

Nested Loop Left Join (cost=18.13..8,047.50 rows=1 width=335) (actual time=1.092..259.252 rows=222 loops=1)

12. 4.985 256.172 ↓ 222.0 222 1

Nested Loop Left Join (cost=17.71..8,040.47 rows=1 width=302) (actual time=1.084..256.172 rows=222 loops=1)

  • Join Filter: ((fechalanzamientoval.m_ch_value_id)::text = (fechalanzamiento.m_ch_value_id)::text)
  • Rows Removed by Join Filter: 47,074
13. 0.469 246.525 ↓ 222.0 222 1

Nested Loop Left Join (cost=17.71..8,015.51 rows=1 width=328) (actual time=1.069..246.525 rows=222 loops=1)

14. 0.244 243.836 ↓ 222.0 222 1

Nested Loop (cost=17.29..8,008.48 rows=1 width=295) (actual time=1.061..243.836 rows=222 loops=1)

  • Join Filter: ((principalweb.m_ch_value_id)::text = (principalwebval.m_ch_value_id)::text)
  • Rows Removed by Join Filter: 2,612
15. 1.620 242.175 ↓ 109.0 1,417 1

Nested Loop (cost=17.29..7,987.99 rows=13 width=321) (actual time=0.176..242.175 rows=1,417 loops=1)

16. 1.331 227.802 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=16.87..7,935.68 rows=15 width=255) (actual time=0.172..227.802 rows=1,417 loops=1)

17. 1.374 223.637 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=16.60..7,931.18 rows=15 width=281) (actual time=0.165..223.637 rows=1,417 loops=1)

18. 1.639 209.510 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=16.18..7,825.72 rows=15 width=248) (actual time=0.160..209.510 rows=1,417 loops=1)

19. 14.135 205.037 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=15.91..7,821.25 rows=15 width=274) (actual time=0.156..205.037 rows=1,417 loops=1)

  • -> Index Scan using m_product_ch_value_value on m_product_ch_value color1 (cost=0.42..7.02 rows=1 width=66) (actual time=0.008..0.009 rows=1 loo (...)
20. 4.475 190.902 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=15.49..7,715.79 rows=15 width=241) (actual time=0.146..190.902 rows=1,417 loops=1)

  • -> Index Scan using m_ch_value_key on m_ch_value coleccionval (cost=0.27..0.30 rows=1 width=40) (actual time=0.002..0.002 rows=1 loops=141 (...)
  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = '45148F973F2A4730BE0AF2BE0BB1329C'::text)
  • Rows Removed by Filter: 16
21. 14.028 186.427 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=15.22..7,711.32 rows=15 width=267) (actual time=0.142..186.427 rows=1,417 loops=1)

  • -> Index Scan using m_product_ch_value_value on m_product_ch_value coleccion (cost=0.42..7.02 rows=1 width=66) (actual time=0.006..0 (...)
  • Index Cond: ((m_ch_value_id)::text = (coleccion.m_ch_value_id)::text)
22. 4.309 172.399 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=14.80..7,605.86 rows=15 width=234) (actual time=0.135..172.399 rows=1,417 loops=1)

  • -> Index Scan using m_ch_value_key on m_ch_value segmentoval (cost=0.27..0.30 rows=1 width=40) (actual time=0.002..0.002 rows= (...)
  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = 'EA45388E8BAA4DF7867073A60A448E61'::text)
  • Rows Removed by Filter: 16
23. 14.257 168.090 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=14.52..7,601.36 rows=15 width=260) (actual time=0.130..168.090 rows=1,417 loops=1)

  • -> Index Scan using m_product_ch_value_value on m_product_ch_value segmento (cost=0.42..7.02 rows=1 width=66) (actual ti (...)
  • Index Cond: ((m_ch_value_id)::text = (segmento.m_ch_value_id)::text)
24. 4.260 153.833 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=14.10..7,495.91 rows=15 width=227) (actual time=0.121..153.833 rows=1,417 loops=1)

  • -> Index Scan using m_ch_value_key on m_ch_value tipolenteval (cost=0.27..0.31 rows=1 width=40) (actual time=0.002 (...)
  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = 'F1313D6000D748C28F0D939D41AA43F1'::text)
  • Rows Removed by Filter: 16
25. 149.573 149.573 ↓ 94.5 1,417 1

Nested Loop Left Join (cost=13.83..7,491.20 rows=15 width=253) (actual time=0.118..149.573 rows=1,417 loops=1)

  • -> Nested Loop Left Join (cost=13.41..7385.74 rows=15 width=220) (actual time=0.110..135.457 rows=1,417 loops (...)
  • -> Nested Loop Left Join (cost=13.14..7381.26 rows=15 width=246) (actual time=0.107..131.153 rows=1,417 (...)
  • -> Nested Loop Left Join (cost=12.72..7275.80 rows=15 width=213) (actual time=0.100..117.256 row (...)
  • -> Nested Loop Left Join (cost=12.45..7271.28 rows=15 width=239) (actual time=0.096..113.0 (...)
  • -> Nested Loop Left Join (cost=12.03..7165.82 rows=15 width=206) (actual time=0.086. (...)
  • -> Nested Loop Left Join (cost=11.75..7161.32 rows=15 width=232) (actual time= (...)
  • -> Nested Loop Left Join (cost=11.33..7055.87 rows=15 width=199) (actual (...)
  • -> Nested Loop Left Join (cost=11.06..7051.39 rows=15 width=225) ( (...)
  • -> Nested Loop (cost=10.64..6945.93 rows=15 width=192) (actu (...)
  • -> Nested Loop (cost=10.36..6920.06 rows=15 width=179) (...)
  • -> Hash Join (cost=10.07..6882.77 rows=40 width= (...)
  • Hash Cond: ((category.m_ch_value_id)::text = (...)
  • -> Seq Scan on m_product_ch_value category (...)
  • Filter: ((m_characteristic_id)::text = (...)
  • Rows Removed by Filter: 147,461
  • -> Hash (cost=10.05..10.05 rows=2 width=40 (...)
  • Buckets: 1,024 Batches: 1 Memory Usag (...)
  • -> Bitmap Heap Scan on m_ch_value cat (...)
  • Filter: ((em_etn_idvaluews)::tex (...)
  • Heap Blocks: exact=1
  • -> Bitmap Index Scan on em_etn_ (...)
  • Index Cond: ((em_etn_idval (...)
  • -> Index Scan using m_product_key on m_product ( (...)
  • Index Cond: ((m_product_id)::text = (categor (...)
  • Filter: ((em_etn_active ~~* 'Y'::text) AND ( (...)
  • Rows Removed by Filter: 1
  • -> Index Scan using m_product_key on m_product gen (co (...)
  • Index Cond: ((m_product_id)::text = (m_product.gen (...)
  • -> Index Scan using m_product_ch_value_value on m_product_ch_ (...)
  • Index Cond: ((m_product_id)::text = (m_product.m_product (...)
  • Filter: ((m_characteristic_id)::text = '68EA743B86704B26 (...)
  • Rows Removed by Filter: 16
  • -> Index Scan using m_ch_value_key on m_ch_value generoval (cost=0 (...)
  • Index Cond: ((m_ch_value_id)::text = (genero.m_ch_value_id)::t (...)
  • -> Index Scan using m_product_ch_value_value on m_product_ch_value age ( (...)
  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = '8B1E8146FBBA446CA3FA73C97A60 (...)
  • Rows Removed by Filter: 16
  • -> Index Scan using m_ch_value_key on m_ch_value ageval (cost=0.27..0.30 rows= (...)
  • Index Cond: ((m_ch_value_id)::text = (age.m_ch_value_id)::text)
  • -> Index Scan using m_product_ch_value_value on m_product_ch_value forma (cost=0.42. (...)
  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = 'BF411D52552B4039A92F0879C202475C'::text)
  • Rows Removed by Filter: 16
  • -> Index Scan using m_ch_value_key on m_ch_value formaval (cost=0.27..0.30 rows=1 width=40 (...)
  • Index Cond: ((m_ch_value_id)::text = (forma.m_ch_value_id)::text)
  • -> Index Scan using m_product_ch_value_value on m_product_ch_value material (cost=0.42..7.02 row (...)
  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = '30FF7AA2E4C24FF98427AE6DFDA963BE'::text)
  • Rows Removed by Filter: 16
  • -> Index Scan using m_ch_value_key on m_ch_value materialval (cost=0.27..0.30 rows=1 width=40) (actual (...)
  • Index Cond: ((m_ch_value_id)::text = (material.m_ch_value_id)::text)
  • -> Index Scan using m_product_ch_value_value on m_product_ch_value tipolente (cost=0.42..7.02 rows=1 width=6 (...)
  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = '25F499E2D6A04075A7906BBC9A74E8B6'::text)
  • Rows Removed by Filter: 16
  • Index Cond: ((m_ch_value_id)::text = (tipolente.m_ch_value_id)::text)
26. 2.834 2.834 ↑ 1.0 1 1,417

Index Scan using m_ch_value_key on m_ch_value color1val (cost=0.27..0.30 rows=1 width=40) (actual time=0.002..0.002 rows=1 loops=1,417)

  • Index Cond: ((m_ch_value_id)::text = (color1.m_ch_value_id)::text)
27. 12.753 12.753 ↑ 1.0 1 1,417

Index Scan using m_product_ch_value_value on m_product_ch_value color2 (cost=0.42..7.02 rows=1 width=66) (actual time=0.006..0.009 rows=1 loops=1,417)

  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = 'D0C0791348A94D1D98C4A0BA8C0B67D9'::text)
  • Rows Removed by Filter: 16
28. 2.834 2.834 ↑ 1.0 1 1,417

Index Scan using m_ch_value_key on m_ch_value color2val (cost=0.27..0.30 rows=1 width=40) (actual time=0.002..0.002 rows=1 loops=1,417)

  • Index Cond: ((m_ch_value_id)::text = (color2.m_ch_value_id)::text)
29. 12.753 12.753 ↑ 1.0 1 1,417

Index Scan using m_product_ch_value_value on m_product_ch_value principalweb (cost=0.42..3.48 rows=1 width=66) (actual time=0.004..0.009 rows=1 loops=1,417)

  • Index Cond: ((m_product_id)::text = (category.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = 'AB0729D53E39450C8513EA1B0FA77C1C'::text)
  • Rows Removed by Filter: 16
30. 1.128 1.417 ↑ 1.0 2 1,417

Materialize (cost=0.00..20.10 rows=2 width=40) (actual time=0.000..0.001 rows=2 loops=1,417)

31. 0.289 0.289 ↑ 1.0 2 1

Seq Scan on m_ch_value principalwebval (cost=0.00..20.09 rows=2 width=40) (actual time=0.279..0.289 rows=2 loops=1)

  • Filter: ((em_etn_idvaluews)::text ~~* 'Y'::text)
  • Rows Removed by Filter: 485
32. 2.220 2.220 ↑ 1.0 1 222

Index Scan using m_product_ch_value_value on m_product_ch_value fechalanzamiento (cost=0.42..7.02 rows=1 width=66) (actual time=0.007..0.010 rows=1 loops=222)

  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = '07F575EFE0FE46B8B2ED393D81831991'::text)
  • Rows Removed by Filter: 16
33. 4.662 4.662 ↑ 2.3 213 222

Seq Scan on m_ch_value fechalanzamientoval (cost=0.00..18.87 rows=487 width=40) (actual time=0.002..0.021 rows=213 loops=222)

34. 2.664 2.664 ↑ 1.0 1 222

Index Scan using m_product_ch_value_value on m_product_ch_value calibre (cost=0.42..7.02 rows=1 width=66) (actual time=0.007..0.012 rows=1 loops=222)

  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = '8F3E485145894CAF97496ADA0D5AA364'::text)
  • Rows Removed by Filter: 16
35. 0.888 0.888 ↑ 9.7 50 222

Seq Scan on m_ch_value calibreval (cost=0.00..18.87 rows=487 width=40) (actual time=0.001..0.004 rows=50 loops=222)

36. 1.332 1.332 ↑ 1.0 1 222

Seq Scan on etn_pricelist (cost=0.00..1.24 rows=1 width=82) (actual time=0.002..0.006 rows=1 loops=222)

  • Filter: ((rate)::text = '28'::text)
  • Rows Removed by Filter: 18
37. 1.998 1.998 ↑ 6.0 3 222

Index Scan using m_productprice_product on m_productprice prodprice (cost=0.42..7.14 rows=18 width=70) (actual time=0.008..0.009 rows=3 loops=222)

  • Index Cond: ((m_product_id)::text = (m_product.m_product_id)::text)
38. 0.222 0.222 ↑ 4.8 4 222

Seq Scan on m_pricelist_version plv (cost=0.00..1.19 rows=19 width=164) (actual time=0.001..0.001 rows=4 loops=222)

39. 0.444 0.444 ↑ 4.8 4 222

Seq Scan on m_pricelist pl (cost=0.00..1.19 rows=19 width=164) (actual time=0.001..0.002 rows=4 loops=222)

40. 0.444 0.444 ↑ 87.5 2 222

Seq Scan on c_currency cur (cost=0.00..4.75 rows=175 width=8) (actual time=0.002..0.002 rows=2 loops=222)

41. 1.998 1.998 ↑ 1.0 1 222

Index Scan using obretco_mproduct_index on obretco_prol_product prolprod (cost=0.41..0.95 rows=1 width=47) (actual time=0.009..0.009 rows=1 loops=222)

  • Index Cond: ((m_product_id)::text = (principalweb.m_product_id)::text)
  • Filter: (((obretco_productlist_id)::text = '0D83954619AB4776A9EE54F790B41C54'::text) AND (em_etn_visible = 'Y'::bpchar) AND (isactive = 'Y'::bpchar))
  • Rows Removed by Filter: 3
42. 131.527 21,925.155 ↑ 1.5 856 173

HashAggregate (cost=8,879.68..692,527.06 rows=1,273 width=115) (actual time=0.337..126.735 rows=856 loops=173)

  • Group Key: prod2.generic_product_id
43. 5.924 26.456 ↑ 1.0 10,267 1

Hash Join (cost=7,163.07..8,854.01 rows=10,267 width=33) (actual time=18.391..26.456 rows=10,267 loops=1)

  • Hash Cond: ((prod2.generic_product_id)::text = (prod3.generic_product_id)::text)
44. 2.151 2.151 ↑ 1.0 11,542 1

Seq Scan on m_product prod2 (cost=0.00..1,546.42 rows=11,542 width=33) (actual time=0.003..2.151 rows=11,542 loops=1)

45. 0.194 18.381 ↑ 1.0 1,273 1

Hash (cost=7,147.16..7,147.16 rows=1,273 width=33) (actual time=18.380..18.381 rows=1,273 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 97kB
46. 2.421 18.187 ↓ 1.0 1,274 1

HashAggregate (cost=7,134.43..7,147.16 rows=1,273 width=33) (actual time=18.010..18.187 rows=1,274 loops=1)

  • Group Key: (prod3.generic_product_id)::text
47. 4.296 15.766 ↑ 1.0 11,542 1

Hash Right Join (cost=2,070.54..7,105.57 rows=11,542 width=33) (actual time=9.445..15.766 rows=11,542 loops=1)

  • Hash Cond: ((principalweb2.m_product_id)::text = (prod3.m_product_id)::text)
48. 2.166 2.791 ↑ 1.0 10,093 1

Bitmap Heap Scan on m_product_ch_value principalweb2 (cost=379.85..5,387.96 rows=10,249 width=66) (actual time=0.756..2.791 rows=10,093 loops=1)

  • Recheck Cond: ((m_characteristic_id)::text = 'AB0729D53E39450C8513EA1B0FA77C1C'::text)
  • Heap Blocks: exact=1,041
49. 0.625 0.625 ↑ 1.0 10,093 1

Bitmap Index Scan on m_product_ch_value_char_id (cost=0.00..377.29 rows=10,249 width=0) (actual time=0.625..0.625 rows=10,093 loops=1)

  • Index Cond: ((m_characteristic_id)::text = 'AB0729D53E39450C8513EA1B0FA77C1C'::text)
50. 2.130 8.679 ↑ 1.0 11,542 1

Hash (cost=1,546.42..1,546.42 rows=11,542 width=66) (actual time=8.678..8.679 rows=11,542 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,192kB
51. 6.549 6.549 ↑ 1.0 11,542 1

Seq Scan on m_product prod3 (cost=0.00..1,546.42 rows=11,542 width=66) (actual time=0.002..6.549 rows=11,542 loops=1)

52.          

SubPlan (for HashAggregate)

53. 148.076 21,767.172 ↑ 1.0 1 148,076

Limit (cost=537.02..537.03 rows=1 width=40) (actual time=0.147..0.147 rows=1 loops=148,076)

54. 592.304 21,619.096 ↑ 8.0 1 148,076

Sort (cost=537.02..537.04 rows=8 width=40) (actual time=0.146..0.146 rows=1 loops=148,076)

  • Sort Key: principalwebval2.em_etn_idvaluews DESC
  • Sort Method: top-N heapsort Memory: 25kB
55. 765.882 21,026.792 ↑ 1.0 8 148,076

Nested Loop Left Join (cost=5.09..536.98 rows=8 width=40) (actual time=0.022..0.142 rows=8 loops=148,076)

56. 1,202.295 17,917.196 ↑ 1.0 8 148,076

Nested Loop Left Join (cost=4.82..534.60 rows=8 width=66) (actual time=0.019..0.121 rows=8 loops=148,076)

57. 1,480.760 1,480.760 ↑ 1.0 8 148,076

Index Scan using m_product_gen_prod on m_product prod3_1 (cost=0.29..36.42 rows=8 width=33) (actual time=0.004..0.010 rows=8 loops=148,076)

  • Index Cond: ((generic_product_id)::text = (prod2.generic_product_id)::text)
58. 8,202.999 15,234.141 ↑ 1.0 1 1,171,857

Bitmap Heap Scan on m_product_ch_value principalweb2_1 (cost=4.53..62.26 rows=1 width=66) (actual time=0.012..0.013 rows=1 loops=1,171,857)

  • Recheck Cond: ((m_product_id)::text = (prod3_1.m_product_id)::text)
  • Filter: ((m_characteristic_id)::text = 'AB0729D53E39450C8513EA1B0FA77C1C'::text)
  • Rows Removed by Filter: 14
  • Heap Blocks: exact=4,276,315
59. 7,031.142 7,031.142 ↑ 1.0 15 1,171,857

Bitmap Index Scan on m_product_ch_value_value (cost=0.00..4.53 rows=15 width=0) (actual time=0.006..0.006 rows=15 loops=1,171,857)

  • Index Cond: ((m_product_id)::text = (prod3_1.m_product_id)::text)
60. 2,343.714 2,343.714 ↑ 1.0 1 1,171,857

Index Scan using m_ch_value_key on m_ch_value principalwebval2 (cost=0.27..0.30 rows=1 width=40) (actual time=0.002..0.002 rows=1 loops=1,171,857)

  • Index Cond: ((m_ch_value_id)::text = (principalweb2_1.m_ch_value_id)::text)
Planning time : 45.074 ms
Execution time : 22,227.878 ms