VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: pivovary on November 29, 2018, 14:29:27 PM

Title: Slow query - wrong category id
Post by: pivovary on November 29, 2018, 14:29:27 PM
Hello,
i have with slow query

SELECT c.* FROM joom_virtuemart_customs  as c INNER JOIN joom_virtuemart_product_customfields as pc on (c.virtuemart_custom_id=pc.virtuemart_custom_id)\\nINNER JOIN joom_virtuemart_product_categories as cat ON (pc.virtuemart_product_id=cat.virtuemart_product_id) WHERE virtuemart_category_id=\\\"-2\\\" and searchable=\\\"1\\\" and (field_type=\\\"S\\\" or field_type=\\\"P\\\") and c.published = 1 GROUP BY c.virtuemart_custom_id

In query is virtuemart_category_id='-2' but this category not exist. Please can you check where is problem?
Title: Re: Slow query - wrong category id
Post by: Studio 42 on November 30, 2018, 01:19:28 AM
Vm and joomla Release ?
template ?
Some special plugins or modules ?
Because i dont know this query, i dont think that VM core use INNER JOIN but only LEFT JOIN most time
Title: Re: Slow query - wrong category id
Post by: pivovary on November 30, 2018, 06:10:17 AM
Sorry,
VM 3.4.2
Joomla 3.8.13
I don't use special plugin for virtuemart
Template is custom but this query is not there
Title: Re: Slow query - wrong category id
Post by: pivovary on December 05, 2018, 11:42:40 AM
This is query from components/com_virtuemart/views/category/category.view.php server is overload every day
Title: Re: Slow query - wrong category id
Post by: jenkinhill on December 05, 2018, 11:46:24 AM
There is no file called category.view.php in default VirtueMart.
Title: Re: Slow query - wrong category id
Post by: pivovary on December 05, 2018, 11:58:44 AM
Sorry file is view.html.php
Title: Re: Slow query - wrong category id
Post by: Milbo on December 05, 2018, 12:26:46 PM
It is the search for customfields, please try the new uploaded version

Try this one http://dev.virtuemart.net/attachments/download/1151/com_virtuemart.3.4.3.9992_package_or_extract.zip (reupped)
Title: Re: Slow query - wrong category id
Post by: pivovary on December 06, 2018, 06:29:50 AM
Hi, on test server all ok, but i do not want upload to production server. If i update it's possible downgrade if will be problem?
Title: Re: Slow query - wrong category id
Post by: jenkinhill on December 06, 2018, 10:58:33 AM
Quote from: pivovary on December 06, 2018, 06:29:50 AM
If i update it's possible downgrade if will be problem?

It can be a problem, so use Akeeba backup to make an archive of the current site, then test the update. If no good then replace the site with the backup.