Advertisement:

Author Topic: Board running slooooooooooow!!  (Read 34989 times)

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,725
  • xxx
Re: Board running slooooooooooow!!
« Reply #20 on: February 21, 2005, 08:32:37 PM »
Oops sorry, also check the "Max width of posted pictures" option and if its enabled set it to 0, same for height.
Liverpool FC Forum with 14 million+ posts.

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #21 on: February 21, 2005, 08:36:54 PM »




what is "Enable compressed output"???  ....its enabled for me..

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,725
  • xxx
Re: Board running slooooooooooow!!
« Reply #22 on: February 21, 2005, 08:39:13 PM »
gzip, in 99.9% of cases you want compressed output on.
Liverpool FC Forum with 14 million+ posts.

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #23 on: February 21, 2005, 08:41:28 PM »
k....

sigh...doesnt look like there is much hope for me then huh :-[

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,725
  • xxx
Re: Board running slooooooooooow!!
« Reply #24 on: February 21, 2005, 08:42:24 PM »
Can you add

$db_show_debug = true;

To your Settings.php file and see what query is taking an age on that page?

* Ben_S hopes $db_show_debug = true; still exists in the relase ver.
Liverpool FC Forum with 14 million+ posts.

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #25 on: February 21, 2005, 08:44:20 PM »
will that make all my users see the queries?......or will only admin see them?

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,725
  • xxx
Re: Board running slooooooooooow!!
« Reply #26 on: February 21, 2005, 08:46:36 PM »
Only admins, assuming it exists still.
Liverpool FC Forum with 14 million+ posts.

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #27 on: February 21, 2005, 08:52:19 PM »
sweeeeet it worked!!!



 SELECT
   IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature,
   mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName, mem.realName,
   mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl, mem.birthdate,
   mem.memberIP, mem.location, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,
   mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,
   mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
   pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,
   IF((mem.ID_GROUP = 0 OR mg.stars = ''), pg.stars, mg.stars) AS stars,
   mem.usertitle
FROM wheels_forummembers AS mem
   LEFT JOIN wheels_forumlog_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
   LEFT JOIN wheels_forumattachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
   LEFT JOIN wheels_forummembergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP)
   LEFT JOIN wheels_forummembergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)
WHERE mem.ID_MEMBER IN ('3', '1974', '2673', '2250', '994', '246', '2972', '5555', '4086', '4189', '4544', '4821')
in /home/httpd/vhosts/wheelsjamaica.com/httpdocs/wheels_forum/Sources/Load.php line 513, which took 5.8163599967957 seconds.

SELECT *
FROM wheels_forumthemes
WHERE ID_MEMBER IN (3, 246, 994, 1974, 2250, 2673, 2972, 4086, 4189, 4544, 4821, 5555)
in /home/httpd/vhosts/wheelsjamaica.com/httpdocs/wheels_forum/Sources/Load.php line 528, which took 1.0223820209503 seconds.

SELECT
   ID_MSG, icon, subject, posterTime, posterIP, ID_MEMBER, modifiedTime, modifiedName, body,
   smileysEnabled, posterName, posterEmail,
   (GREATEST(posterTime, modifiedTime) > 1109035956) AS isRead
FROM wheels_forummessages
WHERE ID_MSG IN (290658,290660,290661,290666,290691,290696,290697,290701,290709,290711,290713,290715,290717,290722,290727)
ORDER BY ID_MSG
in /home/httpd/vhosts/wheelsjamaica.com/httpdocs/wheels_forum/Sources/Display.php line 581, which took 1.2067539691925 seconds.


 SELECT code, filename, description
FROM wheels_forumsmileys
ORDER BY LENGTH(code) DESC
in /home/httpd/vhosts/wheelsjamaica.com/httpdocs/wheels_forum/Sources/Subs.php line 1112, which took 0.30808591842651 seconds.





everything else was .000....

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #28 on: February 21, 2005, 08:56:48 PM »
 SELECT
   IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature,
   mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName, mem.realName,
   mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl, mem.birthdate,
   mem.memberIP, mem.location, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,
   mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,
   mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
   pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,
   IF((mem.ID_GROUP = 0 OR mg.stars = ''), pg.stars, mg.stars) AS stars,
   mem.usertitle
FROM wheels_forummembers AS mem
   LEFT JOIN wheels_forumlog_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
   LEFT JOIN wheels_forumattachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
   LEFT JOIN wheels_forummembergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP)
   LEFT JOIN wheels_forummembergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)
WHERE mem.ID_MEMBER IN ('3', '1974', '2673', '2250', '994', '246', '2972', '5555', '4086', '4189', '4544', '4821')
in /home/httpd/vhosts/wheelsjamaica.com/httpdocs/wheels_forum/Sources/Load.php line 513, which took 8.2671701908112 seconds.




ok verdict:   thats the problem query..everytime

what exactly is this query getting?....if ime not mistaken is it the info need to identify the member (online status, post group, num of posts etc) on the left side of the Thread view?


and by the way.....all users could see the debug links.....i tested...no harm done tho....


« Last Edit: February 21, 2005, 09:07:29 PM by mystik »

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #29 on: February 21, 2005, 09:24:50 PM »
guys ime gonna leave office now.....ile be back online in abt 20 mins from now...pleease dont abandon me....support has been excellent thus far and i feel like we are getting somewhere ...thx again....brb

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Board running slooooooooooow!!
« Reply #30 on: February 21, 2005, 09:30:48 PM »
Can you run this query and runs its results?

Code: [Select]
EXPLAIN SELECT
   IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature,
   mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName, mem.realName,
   mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl, mem.birthdate,
   mem.memberIP, mem.location, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,
   mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,
   mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
   pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,
   IF((mem.ID_GROUP = 0 OR mg.stars = ''), pg.stars, mg.stars) AS stars,
   mem.usertitle
FROM wheels_forummembers AS mem
   LEFT JOIN wheels_forumlog_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
   LEFT JOIN wheels_forumattachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
   LEFT JOIN wheels_forummembergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP)
   LEFT JOIN wheels_forummembergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)
WHERE mem.ID_MEMBER IN ('3', '1974', '2673', '2250', '994', '246', '2972', '5555', '4086', '4189', '4544', '4821')

-[Unknown]

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #31 on: February 21, 2005, 10:11:32 PM »

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Board running slooooooooooow!!
« Reply #32 on: February 21, 2005, 10:43:54 PM »
From that, it's clear that attachments is causing the problems.  Why, though?

Can you try the following, please?

ALTER TABLE wheels_forumattachments
TYPE = InnoDB;
ANALYZE wheels_forumattachments;
OPTIMIZE wheels_forumattachments;

The ALTER will make this table InnoDB too.  InnoDB is good for tables that get written to a lot, and attachments is one that does... the default is MyISAM, which isn't as good at often-written tables, but makes reads a bit better (don't worry, in this case it should be better as InnoDB, and we use InnoDB for attachments here.)

The second and third should tell MySQL to give another hard look at the indexes on the attachments table, essentially.  Hopefully this will convince it to actually use them :P.

-[Unknown]

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #33 on: February 21, 2005, 10:53:16 PM »
the Innodb conversion worked but u iget mysql erros on both of the other statemnents

 MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'wheels_forumattachments' at line 1

but the thread is super fast now!!!!  :D :D :D :D :D

http://www.wheelsjamaica.com/wheels_forum/index.php?topic=21221.0
« Last Edit: February 21, 2005, 10:59:41 PM by mystik »

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #34 on: February 21, 2005, 11:22:43 PM »
 SELECT
   IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, mem.signature,
   mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName, mem.realName,
   mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl, mem.birthdate,
   mem.memberIP, mem.location, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,
   mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,
   mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
   pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,
   IF((mem.ID_GROUP = 0 OR mg.stars = ''), pg.stars, mg.stars) AS stars,
   mem.usertitle
FROM wheels_forummembers AS mem
   LEFT JOIN wheels_forumlog_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
   LEFT JOIN wheels_forumattachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
   LEFT JOIN wheels_forummembergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP)
   LEFT JOIN wheels_forummembergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)
WHERE mem.ID_MEMBER IN ('3', '1974', '2673', '2250', '994', '246', '2972', '5555', '4086', '4189', '4544', '4821')
in /home/httpd/vhosts/wheelsjamaica.com/httpdocs/wheels_forum/Sources/Load.php line 513, which took 0.0019481182098389 seconds.





big improvement! 8)
« Last Edit: February 21, 2005, 11:25:18 PM by mystik »

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Board running slooooooooooow!!
« Reply #35 on: February 22, 2005, 01:34:26 AM »
Oh, alright.  I missed the word TABLE, but if it works now, I'm glad.

-[Unknown]

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Board running slooooooooooow!!
« Reply #36 on: February 22, 2005, 11:15:37 AM »
ok i ran the Analyse and the Optimse..

Thx a million guys....board is lightning fast again....

this thread should help a lot of ppl so i will leave the images up for a while.....

thx again  :D