Because my site has been so slow just lately, I contacted my web host. This is what I was told. Keep in mind that I'm not a programmer, please. I'm only posting here because I see jos_kunena...
I really need help with this.
Casey: [10:12:21 PM] These queries seem to be the larger portion of cpu usage:
[10:12:23 PM] Sun Dec 12 21:02:18 2010
# Query_time: 3.196955 Lock_time: 0.000438 Rows_sent: 39 Rows_examined: 258141
use simmerss_jml4;
SELECT a.*, j.id AS userid, t.message, l.myfavorite, l.favcount, l.threadhits, l.lasttime, l.threadattachments, COUNT(aa.id) AS attachments,
l.msgcount, l.mycount, l.lastid, l.mylastid, l.lastid AS lastread, 0 AS unread, u.avatar, c.name AS catname, c.class_sfx
FROM (
SELECT m.thread, MAX(m.hits) AS threadhits, MAX(f.userid IS NOT null AND f.userid='92') AS myfavorite, COUNT(DISTINCT f.userid) AS favcount,
COUNT(DISTINCT a.id) AS threadattachments COUNT(DISTINCT m.id) AS msgcount, COUNT(DISTINCT IF(m.userid='92', m.id, NULL)) AS mycount,
MAX(m.id) AS lastid, MAX(IF(m.userid='92', m.id, 0)) AS mylastid, MAX(m.time) AS lasttime
FROM jos_kunena_messages AS m LEFT JOIN jos_kunena_favorites AS f ON f.thread = m.thread
LEFT JOIN jos_kunena_attachments AS a ON a.mesid = m.id
WHERE m.hold IN (0) AND m.moved='0' AND m.thread IN (56979,75113,16581,52223,80856,5774,86140,48377,82074,71262,86582,1682,83433,69065,82726,86748,82210,2944,37225,38470)
GROUP BY thread
) AS l
INNER JOIN jos_kunena_messages AS a ON a.thread = l.thread
INNER JOIN jos_kunena_messages_text AS t ON a.id = t.mesid
LEFT JOIN jos_users AS j ON j.id = a.userid
LEFT JOIN jos_kunena_users AS u ON u.userid = j.id
LEFT JOIN jos_kunena_categories AS c ON c.id = a.catid
LEFT JOIN jos_kunena_attachments AS aa ON aa.mesid = a.id
WHERE (a.parent='0' OR a.id=l.lastid )
GROUP BY a.id
ORDER BY lasti DESC