Hi there, in the last two weeks my site has started to be throttled quite a bit, I haven't added any new extensions or plugins to my site in this time, only new articles. I've repaired and optimzed my database and yet I am still getting slow mysql queries and my site is being throttled by my hosts.
Can anyone help me out with what might be causing the problems??
Code:
# Sat Mar 31 04:00:09 2012
# Query_time: 1.071787 Lock_time: 0.001387 Rows_sent: 10 Rows_examined: 8477
use ;
SELECT DISTINCT
cats.title AS cat,
users.username AS author,
cats.section AS SID,
content.title AS title,
content.introtext AS text,
content.created AS date,
content.publish_up AS date_publish,
content.images AS images,
content.id as IID,
CASE WHEN CHAR_LENGTH(content.alias)
THEN CONCAT_WS(":", content.id, content.alias)
ELSE content.id END as ID,
CASE WHEN CHAR_LENGTH(cats.alias)
THEN CONCAT_WS(":", cats.id, cats.alias)
ELSE cats.id END as CID
FROM
jos_content AS content
LEFT JOIN
jos_categories AS categories
ON categories.id = content.catid
LEFT JOIN
jos_sections AS sections
ON sections.id = content.sectionid
LEFT JOIN
jos_menu AS menu
ON menu.componentid = content.id
LEFT JOIN
jos_users AS users
ON users.id = content.created_by
LEFT JOIN
jos_content_frontpage AS frontpage
ON content.id = frontpage.content_id
LEFT JOIN
jos_categories AS cats
ON content.catid = cats.id
WHERE
content.state = 1
AND categories.access <= 0
AND content.access <= 0
AND categories.published = 1
AND ( content.publish_up = '0000-00-00 00:00:00'
OR content.publish_up <= '2012-03-31 10:00:06' )
AND ( content.publish_down = '0000-00-00 00:00:00'
OR content.publish_down >= '2012-03-31 10:00:06' )
AND ( content.catid = 67 )
ORDER BY
content.created DESC
LIMIT
0,10
# Sat Mar 31 04:28:44 2012
# Query_time: 2.387125 Lock_time: 0.000258 Rows_sent: 5394 Rows_examined: 27327
use ;
SELECT a.id, a.title, a.alias, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by, a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.attribs, a.hits, a.images, a.urls, a.ordering, a.metakey, a.metadesc, a.access, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug, CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, cc.title AS category, g.name AS groups, u.email as author_email FROM jos_content AS a INNER JOIN jos_categories AS cc ON cc.id = a.catid LEFT JOIN jos_sections AS s ON s.id = a.sectionid LEFT JOIN jos_users AS u ON u.id = a.created_by LEFT JOIN jos_groups AS g ON a.access = g.id WHERE a.access <= 0 AND s.id = 1 AND s.access <= 0 AND cc.access <= 0 AND s.published = 1 AND cc.published = 1 AND a.state = 1 AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '2012-03-31 10:28:41' ) AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '2012-03-31 10:28:41' ) ORDER BY a.created DESC
These are the queries that are re-occuring and causing the problems, or could be it be a simple fact that the traffic to my site is outgrowing my current shared hosting??
Thanks for any help in advance