hi cpu usage

  • Posts: 490
  • Thank you received: 2
6 years 6 months ago #293190

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.5.38
-- Error-message(debug-mod must be tuned on) -- : none

hi gus

im getting complaints from my host telling me im having hi cpu usage. they said this is one of the culprits.

1. Executed 12h 7m 10s ago for 54.227097 sec on Database --> Unknown (NOT FOUND / DELETED)
Date: 2018-05-25 00:37:37 Query_time: 54.227097 Rows_examined: 32: Rows_sent 15 Lock_time: 26.725440
# Schema: mayari79_l15t6we  Last_errno: 0  Killed: 0 SELECT * FROM s0671ast_hikashop_filter WHERE filter_published = 1 AND (filter_access = 'all' OR filter_access LIKE '%,14,%') ORDER BY filter_ordering; 
----------------------------------------------------------------------------------------------------
 2. Executed 12h 7m 10s ago for 40.320099 sec on Database --> mayari79_l15t6we 
Date: 2018-05-25 00:37:37 Query_time: 40.320099 Rows_examined: 32: Rows_sent 15 Lock_time: 13.004399
# Schema: mayari79_l15t6we  Last_errno: 0  Killed: 0 SELECT * FROM s0671ast_hikashop_filter WHERE filter_published = 1 AND (filter_access = 'all' OR filter_access LIKE '%,14,%') ORDER BY filter_ordering;

the queries above according to them are slow and causing the problems.

can you tell me where this query is being done? is this query running even do no one is accessing the site.? if this is indeed causing the issue can you tell me how to fix this


thanks in advance

Last edit: 6 years 6 months ago by Jerome. Reason: [code] is nice

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
6 years 5 months ago #293237

Hi,

This query is done when a product is being added to the cart, or when the cart is being loaded.
It's done to load filters.
This query can be slow if you have a lot of filters.
Is that the case ?
If you have similar filters, it's best if you can merge them together, and if you can delete the filters you don't use anymore.
That should help a lot.

Please Log in or Create an account to join the conversation.

  • Posts: 490
  • Thank you received: 2
6 years 5 months ago #294107

hi

how many is many? i mean how many is considered many? 3? 5? 10?

thanks

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
6 years 5 months ago #294108

Hi,

When I mean many it is like a few hundreds or thousands.

If you have only 10 filters, then I don't see why that query would be slow. It's just a simple query on a simple table with simple conditions. We have more complex queries on the product table, which is more complex and big and the queries are faster even with thousands of elements.
So if you have these logs of that query taking 40 seconds for only 10 filters, then you have a problem with your database or your MySQL server.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum