Author Topic: Slow query - wrong category id  (Read 400 times)

pivovary

  • Beginner
  • *
  • Posts: 17
  • A beginner
Slow query - wrong category id
« 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?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3514
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Slow query - wrong category id
« Reply #1 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

pivovary

  • Beginner
  • *
  • Posts: 17
  • A beginner
Re: Slow query - wrong category id
« Reply #2 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

pivovary

  • Beginner
  • *
  • Posts: 17
  • A beginner
Re: Slow query - wrong category id
« Reply #3 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

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27096
  • Always on vacation
    • Jenkin Hill Internet
Re: Slow query - wrong category id
« Reply #4 on: December 05, 2018, 11:46:24 am »
There is no file called category.view.php in default VirtueMart.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.4.3.9989 on Joomla 3.9.1 PHP 7.0.32
Testing VM 3.4.3.9993 on Joomla 3.9.1

pivovary

  • Beginner
  • *
  • Posts: 17
  • A beginner
Re: Slow query - wrong category id
« Reply #5 on: December 05, 2018, 11:58:44 am »
Sorry file is view.html.php

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9741
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Slow query - wrong category id
« Reply #6 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)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

pivovary

  • Beginner
  • *
  • Posts: 17
  • A beginner
Re: Slow query - wrong category id
« Reply #7 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?

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27096
  • Always on vacation
    • Jenkin Hill Internet
Re: Slow query - wrong category id
« Reply #8 on: December 06, 2018, 10:58:33 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.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.4.3.9989 on Joomla 3.9.1 PHP 7.0.32
Testing VM 3.4.3.9993 on Joomla 3.9.1