explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c3HJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.316 2,270.512 ↓ 5.0 25 1

Aggregate (cost=4,068.11..4,889.82 rows=5 width=668) (actual time=2,268.288..2,270.512 rows=25 loops=1)

  • Buffers: shared hit=219928
2.          

Initplan (forAggregate)

3. 0.005 0.212 ↑ 1.0 1 1

Limit (cost=0.28..12.35 rows=1 width=41) (actual time=0.21..0.212 rows=1 loops=1)

  • Buffers: shared hit=3
4. 0.207 0.207 ↑ 5.0 1 1

Index Scan using m_pricelist_name_validfrom on m_pricelist_version m_pricelist_version (cost=0.28..60.66 rows=5 width=41) (actual time=0.207..0.207 rows=1 loops=1)

  • Index Cond: (((m_pricelist_version.m_pricelist_id)::text = '361D7CDE0C0749F68E5ECCB39F1FC0C6'::text) AND (m_pricelist_version.validfrom <= now()))
  • Filter: (m_pricelist_version.isactive = 'Y'::bpchar)
  • Buffers: shared hit=3
5. 0.363 0.363 ↑ 2.0 1 1

Seq Scan on web_categorizacion web_categorizacion (cost=0..21.25 rows=2 width=82) (actual time=0.086..0.363 rows=1 loops=1)

  • Filter: (web_categorizacion.ruta = 'balones-y-accesorios/baloncesto'::text)
  • Buffers: shared hit=17
6. 32.641 2,267.261 ↓ 18.0 90 1

Nested Loop (cost=159.42..4,034.4 rows=5 width=668) (actual time=15.083..2,267.261 rows=90 loops=1)

  • Buffers: shared hit=219623
7. 0.225 11.480 ↓ 58.0 58 1

Nested Loop (cost=6.06..205.28 rows=1 width=635) (actual time=1.196..11.48 rows=58 loops=1)

  • Buffers: shared hit=908
8. 0.161 10.153 ↓ 58.0 58 1

Nested Loop (cost=5.64..201.06 rows=1 width=120) (actual time=1.139..10.153 rows=58 loops=1)

  • Buffers: shared hit=676
9. 0.258 9.006 ↓ 58.0 58 1

Nested Loop (cost=5.36..192.76 rows=1 width=105) (actual time=1.09..9.006 rows=58 loops=1)

  • Buffers: shared hit=502
10. 0.502 7.762 ↓ 58.0 58 1

Nested Loop (cost=4.95..186.18 rows=1 width=105) (actual time=1.023..7.762 rows=58 loops=1)

  • Buffers: shared hit=269
11. 0.110 0.648 ↓ 3.9 58 1

Bitmap Heap Scan on m_product_ch_value mpcv (cost=4.53..59.36 rows=15 width=66) (actual time=0.552..0.648 rows=58 loops=1)

  • Buffers: shared hit=32
12. 0.538 0.538 ↓ 3.9 58 1

Bitmap Index Scan on m_product_ch_value_value_idx (cost=0..4.52 rows=15 width=0) (actual time=0.538..0.538 rows=58 loops=1)

  • Index Cond: ((mpcv.m_ch_value_id)::text = ($9)::text)
  • Buffers: shared hit=20
13. 6.612 6.612 ↑ 1.0 1 58

Index Scan using m_productprice_pricelist_ve_un on m_productprice mpp (cost=0.42..8.44 rows=1 width=39) (actual time=0.113..0.114 rows=1 loops=58)

  • Index Cond: (((mpp.m_pricelist_version_id)::text = ($8)::text) AND ((mpp.m_product_id)::text = (mpcv.m_product_id)::text))
  • Buffers: shared hit=234
14. 0.986 0.986 ↑ 1.0 1 58

Index Scan using m_product_key on m_product mp_1 (cost=0.41..6.56 rows=1 width=66) (actual time=0.016..0.017 rows=1 loops=58)

  • Index Cond: ((mp_1.m_product_id)::text = (mpp.m_product_id)::text)
  • Filter: (mp_1.isactive = 'Y'::bpchar)
  • Buffers: shared hit=233
15. 0.986 0.986 ↑ 1.0 1 58

Index Scan using m_ch_value_key on m_ch_value mcv (cost=0.28..8.3 rows=1 width=48) (actual time=0.015..0.017 rows=1 loops=58)

  • Index Cond: ((mcv.m_ch_value_id)::text = ($9)::text)
  • Buffers: shared hit=174
16. 1.102 1.102 ↑ 1.0 1 58

Index Scan using m_product_key on m_product mp (cost=0.41..4.21 rows=1 width=548) (actual time=0.018..0.019 rows=1 loops=58)

  • Index Cond: ((mp.m_product_id)::text = (COALESCE(mp_1.generic_product_id, mp_1.m_product_id))::text)
  • Filter: ((mp.isactive = 'Y'::bpchar) AND ((mp.em_cust_status)::text = 'ACT'::text))
  • Buffers: shared hit=232
17. 38.106 2,223.140 ↓ 1.5 1,406 58

Append (cost=153.36..3,817.69 rows=914 width=33) (actual time=0.232..38.33 rows=1,406 loops=58)

  • Buffers: shared hit=218715
18. 859.971 1,481.494 ↓ 1.6 739 58

Hash Join (cost=153.36..1,622.11 rows=457 width=33) (actual time=0.231..25.543 rows=739 loops=58)

  • Buffers: shared hit=61414
19. 608.768 608.768 ↑ 1.0 32,211 58

Seq Scan on m_product_ch_value m_product_ch_value (cost=0..1,379.11 rows=32,211 width=66) (actual time=0.003..10.496 rows=32,211 loops=58)

  • Buffers: shared hit=61306
20. 0.006 12.755 ↑ 7.8 4 1

Hash (cost=152.97..152.97 rows=31 width=33) (actual time=12.755..12.755 rows=4 loops=1)

  • Buffers: shared hit=108
21. 12.749 12.749 ↑ 7.8 4 1

Seq Scan on m_ch_value m_ch_value (cost=0..152.97 rows=31 width=33) (actual time=12.515..12.749 rows=4 loops=1)

  • Filter: ((m_ch_value.name)::text ~~* '%novedades%'::text)
  • Buffers: shared hit=108
22. 72.616 703.540 ↓ 1.5 667 58

Nested Loop (cost=1,623.67..2,186.44 rows=457 width=33) (actual time=0.591..12.13 rows=667 loops=58)

  • Buffers: shared hit=157301
23. 19.065 50.634 ↓ 1.5 667 58

Aggregate (cost=1,623.25..1,627.82 rows=457 width=33) (actual time=0.556..0.873 rows=667 loops=58)

  • Buffers: shared hit=1165
24. 14.926 31.569 ↓ 1.6 739 1

Hash Join (cost=153.36..1,622.11 rows=457 width=33) (actual time=6.372..31.569 rows=739 loops=1)

  • Buffers: shared hit=1165
25. 10.317 10.317 ↑ 1.0 32,211 1

Seq Scan on m_product_ch_value m_product_ch_value_1 (cost=0..1,379.11 rows=32,211 width=66) (actual time=0.004..10.317 rows=32,211 loops=1)

  • Buffers: shared hit=1057
26. 0.007 6.326 ↑ 7.8 4 1

Hash (cost=152.97..152.97 rows=31 width=33) (actual time=6.326..6.326 rows=4 loops=1)

  • Buffers: shared hit=108
27. 6.319 6.319 ↑ 7.8 4 1

Seq Scan on m_ch_value m_ch_value_1 (cost=0..152.97 rows=31 width=33) (actual time=6.085..6.319 rows=4 loops=1)

  • Filter: ((m_ch_value_1.name)::text ~~* '%novedades%'::text)
  • Buffers: shared hit=108
28. 580.290 580.290 ↑ 1.0 1 38,686

Index Scan using m_product_key on m_product m_product (cost=0.41..1.21 rows=1 width=66) (actual time=0.014..0.015 rows=1 loops=38,686)

  • Index Cond: ((m_product.m_product_id)::text = (m_product_ch_value_1.m_product_id)::text)
  • Buffers: shared hit=156136
29.          

SubPlan (forAggregate)

30. 0.075 0.525 ↓ 0.0 0 25

Limit (cost=8.31..14.17 rows=1 width=4) (actual time=0.021..0.021 rows=0 loops=25)

  • Buffers: shared hit=57
31. 0.112 0.450 ↓ 0.0 0 25

Hash Join (cost=8.31..14.17 rows=1 width=4) (actual time=0.018..0.018 rows=0 loops=25)

  • Buffers: shared hit=57
32. 0.088 0.088 ↑ 5.4 15 4

Seq Scan on m_offer m_offer (cost=0..5.64 rows=81 width=37) (actual time=0.008..0.022 rows=15 loops=4)

  • Filter: ((m_offer.datefrom <= now()) AND ((m_offer.dateto IS NULL) OR (m_offer.dateto >= now())))
  • Buffers: shared hit=4
33. 0.050 0.250 ↓ 0.0 0 25

Hash (cost=8.3..8.3 rows=1 width=33) (actual time=0.01..0.01 rows=0 loops=25)

  • Buffers: shared hit=53
34. 0.200 0.200 ↓ 0.0 0 25

Index Only Scan using m_offer_product_unique on m_offer_product m_offer_product (cost=0.28..8.3 rows=1 width=33) (actual time=0.008..0.008 rows=0 loops=25)

  • Index Cond: (m_offer_product.m_product_id = (COALESCE(mp_1.generic_product_id, mp_1.m_product_id))::text)
  • Buffers: shared hit=53
35. 0.009 0.603 ↓ 0.0 0 9

Limit (cost=0.28..13.37 rows=1 width=4) (actual time=0.067..0.067 rows=0 loops=9)

  • Buffers: shared hit=30
36. 0.033 0.594 ↓ 0.0 0 9

Nested Loop (cost=0.28..13.37 rows=1 width=4) (actual time=0.066..0.066 rows=0 loops=9)

  • Buffers: shared hit=30
37. 0.072 0.072 ↓ 0.0 0 9

Index Only Scan using m_offer_product_unique on m_offer_product m_offer_product_1 (cost=0.28..8.3 rows=1 width=33) (actual time=0.008..0.008 rows=0 loops=9)

  • Index Cond: (m_offer_product_1.m_product_id = (COALESCE(mp_1.generic_product_id, mp_1.m_product_id))::text)
  • Buffers: shared hit=21
38. 0.489 0.489 ↓ 1.5 6 3

Seq Scan on m_offer m_offer_1 (cost=0..5.03 rows=4 width=37) (actual time=0.047..0.163 rows=6 loops=3)

  • Filter: ((m_offer_1.name)::text ~~* '%fuera stocks%'::text)
  • Buffers: shared hit=9
39. 0.016 1.232 ↑ 1.0 1 16

Limit (cost=136.77..136.78 rows=1 width=4) (actual time=0.076..0.077 rows=1 loops=16)

  • Buffers: shared hit=218
40. 0.032 1.216 ↑ 1.0 1 16

Aggregate (cost=136.77..136.78 rows=1 width=4) (actual time=0.076..0.076 rows=1 loops=16)

  • Buffers: shared hit=218
41. 0.048 1.184 ↓ 0.0 0 16

Nested Loop (cost=134.79..136.77 rows=1 width=4) (actual time=0.074..0.074 rows=0 loops=16)

  • Buffers: shared hit=218
42. 0.032 1.056 ↓ 0.0 0 16

Aggregate (cost=134.64..134.75 rows=11 width=33) (actual time=0.066..0.066 rows=0 loops=16)

  • Buffers: shared hit=208
43. 0.103 1.024 ↑ 11.0 1 16

Nested Loop (cost=4.78..134.62 rows=11 width=33) (actual time=0.052..0.064 rows=1 loops=16)

  • Buffers: shared hit=208
44. 0.112 0.480 ↑ 3.7 3 16

Bitmap Heap Scan on m_product m_product_1 (cost=4.5..47.21 rows=11 width=33) (actual time=0.026..0.03 rows=3 loops=16)

  • Buffers: shared hit=97
45. 0.368 0.368 ↑ 3.7 3 16

Bitmap Index Scan on m_product_gen_prod (cost=0..4.49 rows=11 width=0) (actual time=0.023..0.023 rows=3 loops=16)

  • Index Cond: ((m_product_1.generic_product_id)::text = (COALESCE(mp_1.generic_product_id, mp_1.m_product_id))::text)
  • Buffers: shared hit=48
46. 0.441 0.441 ↓ 0.0 0 49

Index Only Scan using m_offer_product_unique on m_offer_product m_offer_product_2 (cost=0.28..7.94 rows=1 width=66) (actual time=0.009..0.009 rows=0 loops=49)

  • Index Cond: (m_offer_product_2.m_product_id = (m_product_1.m_product_id)::text)
  • Buffers: shared hit=111
47. 0.080 0.080 ↓ 0.0 0 5

Index Scan using m_offer_key on m_offer m_offer_2 (cost=0.14..0.17 rows=1 width=37) (actual time=0.016..0.016 rows=0 loops=5)

  • Index Cond: ((m_offer_2.m_offer_id)::text = (m_offer_product_2.m_offer_id)::text)
  • Filter: ((m_offer_2.name)::text ~~* '%fuera stocks%'::text)
  • Buffers: shared hit=10