slow mysql query [message #166476] |
Mon, 19 December 2011 21:23 |
|
andy_scouser
Messages: 76 Registered: June 2003
Karma: 1
|
Member |
|
|
Hi there.
I upgraded the forum today to 3.0.3 and am now experiencing a noticeable slow down when ever a message is selected. My mysql-slow.log is reporting lots of the same errors.
I wonder if you could offer any guidance please?
# Time: 111219 23:17:31
# User@Host: honda[honda] @ localhost []
# Query_time: 14 Lock_time: 0 Rows_sent: 7 Rows_examined: 252391
SELECT
m.*, COALESCE(m.flag_cc, u.flag_cc) AS disp_flag_cc, COALESCE(m.flag_country, u.flag_country) AS disp_flag_country,
t.thread_opt, t.root_msg_id, t.last_post_id, t.forum_id,
f.message_threshold,
u.id AS user_id, u.alias AS login, u.avatar_loc, u.email, u.posted_msg_count, u.join_date, u.location,
u.sig, u.custom_status, u.icq, u.jabber, u.affero, u.aim, u.msnm, u.yahoo, u.google, u.skype, u.twitter, u.users_opt, u.last_
visit AS time_sec,
l.name AS level_name, l.level_opt, l.img AS level_img,
p.max_votes, p.expiry_date, p.creation_date, p.name AS poll_name, p.total_votes,
1 AS cant_vote
FROM forum_msg m
INNER JOIN forum_thread t ON m.thread_id=t.id
INNER JOIN forum_forum f ON t.forum_id=f.id
LEFT JOIN forum_users u ON m.poster_id=u.id
LEFT JOIN forum_level l ON u.level_id=l.id
LEFT JOIN forum_poll p ON m.poll_id=p.id WHERE m.thread_id=16286 AND m.apr=1 ORDER BY m.id ASC LIMIT 20 OFFSET 0;
|
|
|
|
Re: slow mysql query [message #166480 is a reply to message #166477] |
Wed, 21 December 2011 06:44 |
|
andy_scouser
Messages: 76 Registered: June 2003
Karma: 1
|
Member |
|
|
ok, maybe i have a local issue then.... can you offer any ideas at all please? all the database tables look ok but i ran a 'repair table' on them any way.
Here is my environment if it held at all.
UDforum version: 3.0.3
PHP version: 5.2.6-1+lenny13
Database type: mysql (mysql)
Database version: 5.0.51a-24+lenny5-log
Web server: Apache
Web Server load: 4.99
Web server to PHP interface: apache2handler
WebServer User/Group: www-data / www-data (33/33)
Relevant PHP settings:
Safe mode: OFF
Open basedir: none
Display errors: ON
File uploads: ON
Maximum file upload size: 8M
Magic quotes: ON
Output buffering: No
Disabled functions: none
PSpell support: No
Zlib support: Yes
[Updated on: Wed, 21 December 2011 06:44] Report message to a moderator
|
|
|
|