Keyword

MySQL queries slowing site down

  • Russell English
  • Russell English's Avatar Topic Author
  • Offline
  • New Member
More
7 years 10 months ago #159047 by Russell English
MySQL queries slowing site down was created by Russell English
Our website (running Joomla 3.6.4) and K2 seems to constantly crash, due to slow MySQL queries. The majority of which are K2 related. Here is one of the queries:
Executed 2h 33m 16s ago for 44.66179 sec on Database --> realspor_october
Date: 2016-11-09 08:53:56 Query_time: 44.661790 Rows_examined: 0: Rows_sent 0 Lock_time: 0.000344
SELECT DISTINCT i.*,c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams FROM ffak3_k2_items as i RIGHT JOIN ffak3_k2_categories c ON c.id = i.catid WHERE i.published = 1 AND i.access IN(1,1,5) AND i.trash = 0 AND c.published = 1 AND c.access IN(1,1,5) AND c.trash = 0 AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2016-11-09 14:53:10' ) AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2016-11-09 14:53:10' ) AND i.catid IN (10,89) ORDER BY i.publish_up DESC LIMIT 0, 3;

This is simply running K2, but why would the above query slow the site down?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 10 months ago #159063 by Krikor Boghossian
Replied by Krikor Boghossian on topic MySQL queries slowing site down
Hello Russell,

You will find this post useful -> www.joomlaworks.net/forum/k2-en/45358-slow-query-issue

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
7 years 9 months ago #159356 by charles johney
Replied by charles johney on topic MySQL queries slowing site down
MySQL has generally had a notoriety of being quick. You may need to investigate utilizing more servers. Whiteboard animations - FlamingoVideo.com

Additionally, would you say you are certain its the database execution that is the bottleneck? It could be the PHP handling or some other piece.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 9 months ago #159365 by Krikor Boghossian
Replied by Krikor Boghossian on topic MySQL queries slowing site down
Hello Charles, please do not use irrelevant posts advertise your marketing company.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum