VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: Master_gray on February 26, 2013, 19:24:20 PM

Title: queries are slowing your site down - Really really need help people!!!
Post by: Master_gray on February 26, 2013, 19:24:20 PM
Hi all as the subject says i really really need help,

my host emailed me with the following:

QuoteHi

Some of your queries are slowing your site down.

Example:
SELECT * FROM `ipxt6_virtuemart_products_en_gb` as l JOIN
`ipxt6_virtuemart_products` AS p using (`virtuemart_product_id`) LEFT
JOIN `ipxt6_virtuemart_product_prices` as pp ON
p.`virtuemart_product_id` = pp.`virtuemart_product_id` LEFT JOIN
`ipxt6_virtuemart_product_shoppergroups` ON p.`virtuemart_product_id` =
`ipxt6_virtuemart_product_shoppergroups`.`virtuemart_product_id`
LEFT OUTER JOIN `ipxt6_virtuemart_shoppergroups` as s ON
s.`virtuemart_shoppergroup_id` =
`ipxt6_virtuemart_product_shoppergroups`.`virtuemart_shoppergroup_id`
WHERE ( p.`published`="1" AND ( s.`virtuemart_shoppergroup_id`= "1"
OR s.`virtuemart_shoppergroup_id` IS NULL ) ) group by
p.`virtuemart_product_id` ORDER BY RAND() ASC LIMIT 0, 1;


This query result is too wide to be stored in a memory table while
processing, due to the "*" which gets all fields, including very big
ones. This means that the disk is used to store the results temporarily
which is slow.
My suggestion would be to rework this query, perhaps into 2 parts, the
random part and then a select for * on the resulting record ID only.

and then this one:

QuoteHi

Hope you are very well.

Sorry to be a pain but this is actually becoming a bit of an issue, the
queries on wide tables are causing a lot of disk access.

First off i do not know what he is talking about can anybody help me with this?
just say what information you need and i will supply them please help.

i have been using the VM bulk editor if that help any.

my setup is:
joomla 2.5.4
virtuemart  2.0.8c

Thanks.
Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: Milbo on February 28, 2013, 22:50:32 PM
I think your version is just old. Please use the latest version 2.0.18b. It is imho 30% faster. I cannot find this query, I dont know where we use a query like that.
Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: Master_gray on March 01, 2013, 22:41:49 PM
Hi there,

Thanks for the reply,i have allot of css changes on my site (small but still a pan to fix with a update) do you maybe have a way of updating without changing my changes or do i just have to work overtime to fix it?

I have setup jotcache and my host said that it's running better now so maybe if i update VM i will not have any problems - hope for the best.
i will keep this updated and let you guys know if anything changes.

can you tell me one more thing,what is a good or average page load time?i think mine is slow 2.3 sec (on pingdom .com)

Thanks once again.
Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: PRO on March 02, 2013, 04:00:35 AM
http://forum.virtuemart.net/index.php?topic=90935.0
Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: Peter Pillen on March 02, 2013, 23:50:40 PM
Do you have link to your site? Otherwise it is hard to check.
Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: Master_gray on March 04, 2013, 09:14:34 AM
Hi,

Thanks for the link i will have a look at it,Here is my site link http://www.spectratec.co.za/ (http://www.spectratec.co.za/)
Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: PRO on March 04, 2013, 21:00:37 PM
Master_gray

you need to use
http://extensions.joomla.org/extensions/core-enhancements/performance/site-performance/12088

to gzip your css files ONLY

That will speed your site up a lot
Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: Master_gray on March 05, 2013, 09:58:10 AM
Thank you PRO,

should i set the options in the plug-in all to "NO" and only the gZIP to"YES"?
Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: PRO on March 05, 2013, 10:33:24 AM
combine css and gzip css ONLY


do not do JS files

Title: Re: queries are slowing your site down - Really really need help people!!!
Post by: Master_gray on March 05, 2013, 10:44:32 AM
Thank you so much PRO.