VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Peter Pillen on May 28, 2014, 18:30:29 PM

Title: Too much queries in category view
Post by: Peter Pillen on May 28, 2014, 18:30:29 PM
Site is in development and not accessible without password.

Site: http://test.pillini.be/webshop/schoenen/damesschoenen (http://test.pillini.be/webshop/schoenen/damesschoenen)
User login: demo
Password: demo1
Hosting: siteground
Joomla 2.5.9 + VM 2.6.2

In the link provided above a whopping 5600 queries are executed (I enabled VM debug mode as well as the joomla debug mode). Somehow all queries are executed as normal: menu's, modules, first 24 products, media's and manufacturers and then ... a query that looks up all the info for the other 524 products ... resulting in an extra 5000 queries :/ I have no idea where this is coming from. Does anyone have an idea? The queries seem related to the customs and customfields but I don't know what is triggering this.

The template designer says that these are VM queries/not template queries ... but I don't fully agree. Setting the template to beez5 in VM configuration makes the number of queries drop to 350.
Title: Re: Too much queries in category view
Post by: GJC Web Design on May 28, 2014, 19:14:17 PM
First thought is if Beez drops it to 350 then there is something in his template over rides doing all this querying...

try with his template and the folder templates/YOUR_TEMPLATE/html/com_virtuemart remamed to something else

if not see if any modules on a cat page a similarily over ridden
Title: Re: Too much queries in category view
Post by: Peter Pillen on May 28, 2014, 23:40:39 PM
Thx GjC ... but no solution

Well... funny thing is that i disabled all modules (without exception) and even then I get 5000 queries. 100% sure it is the template now. The limit and limitstart is handled by ajax (not my strongest type of programming) and I suspect that being part of the problem. Does anyone recognize the surplus queries?
Title: Re: Too much queries in category view
Post by: GJC Web Design on May 29, 2014, 00:05:57 AM
if u check just the component view  test.pillini.be/webshop/schoenen/damesschoenen?tmpl=component

there are still 4500 queries

multiple groups of 542 × SELECT *   which is identical to the nmber of articles in the cat

542 artikelen - this isn't normal - should only query the number on the page

but impossible to find more without complete access



Title: Re: Too much queries in category view
Post by: Peter Pillen on May 29, 2014, 07:36:55 AM
Would you take a look? Tell me what access you need and I will make the necessary logins.

Solved ... the queries are made by the Ajax product filter on the right side. It makes a filter for all the products based on brand, price and possible cart attributes. It needs to run through all products in a categorie in order to make filtering possible. It has some tuning options which I need to look into. Thanks for the help!