VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Studio 42 on July 30, 2015, 22:17:35 PM

Title: Bad price index for product price table
Post by: Studio 42 on July 30, 2015, 22:17:35 PM
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.