News:

Looking for documentation? Take a look on our wiki

Main Menu

Bad price index for product price table

Started by Studio 42, July 30, 2015, 22:17:35 PM

Previous topic - Next topic

Studio 42

Hi,
I'm on speedup a customer site. I checked to add the index for product_price and was wondered this exist.
On looking details i have seeen this is in error. the index product_price used virtuemart_product_id column.
I changed the index to use product_price , this give a speed boost of 20% for page render when you have many products and order by product price.
TO change index
ALTER TABLE `#__virtuemart_product_prices` DROP INDEX  product_price
if index do not exist simply :
ALTER TABLE `#__virtuemart_product_prices` ADD INDEX product_price (product_price)
If you use mysql do not forget to change table prefix

I checked in last VM 3.0.9.4, the index is bad too.