Ok I jsut converted Rygels version to this and alot of our users have loads of entrys.
The problem is if I click someone with over 500 entrys it takes about 2 minutes for the page to load. Something is obviously not right anyone got any ideas I've quoted the querie that seems to be causing the problem
User with 500 entrys...
105.45921612 seconds (0.26% PHP - 99.74% MySQL) with 17 queries
Quote:
Query:
SELECT journal_entries.entry_id, journal_entries.entrytitle,
journal_entries.entrytext, journal_entries.mood, journal_entries.allowbuddies,journal_entries.entry date,
journal_entries.entry_totalvotes, journal_moods.mood_name, journal_entries.ipaddress,journal_moods.mood_image , journal_entries.entry_totalrating,
journal_entries.private, journal_entries.whocanview,
COUNT(journal_comments.comment_text) AS comments
FROM journal_entries AS journal_entries
LEFT JOIN journal_comments AS journal_comments ON (journal_entries.entry_id=journal_comments.entry_i d)
LEFT JOIN journal_moods AS journal_moods ON (journal_moods.mood_id=journal_entries.mood)
WHERE journal_entries.journal_id='62'
AND entry_active='1'
GROUP BY journal_entries.entry_id
ORDER BY entrydate ASC
LIMIT 0,10
Time before: 0.66441702842712
Time after: 93.359127044678
Time taken: 92.694710016251
table type possible_keys key key_len ref rows Extra
journal_entries ALL 16789 Using where; Using temporary; Using filesort
journal_comments ALL 13251
journal_moods eq_ref PRIMARY PRIMARY 4 journal_entries.mood 1
|