Welcome, Guest. Please Login or Register.
November 22, 2017, 02:20:39 AM
Home Help Search Login Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  FAQ  |  Topic: Large message boards and MySQL logs of slow response « previous next »
Pages: 1 ... 3 4 [5] 6 7 ... 10 Reply Ignore Print
Author Topic: Large message boards and MySQL logs of slow response  (Read 62947 times)
Mostmaster
Full Member
***
Posts: 184


I love all the YaBBs, but this one is the best!


WWW
Re:Large message boards and MySQL logs of slow response
« Reply #60 on: April 30, 2002, 01:10:36 PM »
Reply with quote


In addition to the database changes listed above, I also took out MostMaster's image resizer from the forum code. I don't need this particular function on my forum, and it has greatly increased in speed, especially on threads with many posts (and many sigs).


You don't need to remove the code because you can easily turn on/off the option in your admincenter. And it only works for sigs and normal posts, not for avatars ;)
It can slow down your board if it tries to get the size of an non-existing image or an image on a slow server. That's the only disadvantage of this method. :-\
Logged
Mach8
Sweetie
Beta Tester
YaBB God
*****
Posts: 1218



Re:Large message boards and MySQL logs of slow response
« Reply #61 on: April 30, 2002, 01:15:12 PM »
Reply with quote

Mostmaster: normal people would do that, but since I've edited every source file on my forum, removing stuff I don't use I thought I'd do it with that too ;)

It's a good piece of code, nothing wrong with it, the only flaw as you've said is that if the server replies slowly, or the file doesn't exist then you're bound to experience speed problems.
Logged
Webby
Beta Tester
YaBB God
*****
Posts: 829


Some mistakes are too funny to make only once.


WWW
Re:Large message boards and MySQL logs of slow response
« Reply #62 on: April 30, 2002, 03:48:17 PM »
Reply with quote

How exactly can I see whether my database is up-to-date or not ?  And if so, using the script will ruin it, or is it always "safe" to use it.

I can certainly make a backup first, but want to know this for my own peace of mind ;)

The second script I have to run every month or so you say ?!
Logged

Webby of salesplaza.nl
The YaBBSE buttongenerator : Click HERE !
Egg
Full Member
***
Posts: 139


I'm a llama!


WWW
Re:Large message boards and MySQL logs of slow response
« Reply #63 on: May 01, 2002, 08:26:41 AM »
Reply with quote

Mediman


can you tell me how and where to save / run the script??

just a bit new to this game ;)

thanks

Egg

Logged
mediman
Support Team
YaBB God
*****
Posts: 2858



WWW
Re:Large message boards and MySQL logs of slow response
« Reply #64 on: May 01, 2002, 08:45:28 AM »
Reply with quote


How exactly can I see whether my database is up-to-date or not ?  And if so, using the script will ruin it, or is it always "safe" to use it.

I can certainly make a backup first, but want to know this for my own peace of mind ;)

The second script I have to run every month or so you say ?!


if you need info how uptodate is your mysql try this

Code: [Select]

<?php<br><br>$db_name "";<br>$db_user "";<br>$db_passwd "";<br>$db_server "";<br>$db_prefix "";<br><br>mysql_connect("$db_server","$db_user","$db_passwd");<br>$vers mysql_get_server_info();<br>echo "Version: $vers";<br>?>


The scripts have no code that will in any form be a risk of you db...
the script is so written, that the optimizing part depents on your mysql version... only if you have a version 3.23.xx the table type will be changed to MyISAM!

the optimize script can you run so often you want, i use it twice a month, but once a month is also ok!

medi

if you have any questions...
Logged

mainComm Dev Team
mediman
Support Team
YaBB God
*****
Posts: 2858



WWW
Re:Large message boards and MySQL logs of slow response
« Reply #65 on: May 01, 2002, 08:49:05 AM »
Reply with quote


Mediman


can you tell me how and where to save / run the script??

just a bit new to this game ;)

thanks

Egg


copy & paste the code in a textfile, rename it to optidb.php (or what ever you want) and upload it anywhere to your server. run it and thats it!

medi
Logged

mainComm Dev Team
Webby
Beta Tester
YaBB God
*****
Posts: 829


Some mistakes are too funny to make only once.


WWW
Re:Large message boards and MySQL logs of slow response
« Reply #66 on: May 01, 2002, 09:43:17 AM »
Reply with quote

Quote


The scripts have no code that will in any form be a risk of you db...
the script is so written, that the optimizing part depents on your mysql version... only if you have a version 3.23.xx the table type will be changed to MyISAM!

the optimize script can you run so often you want, i use it twice a month, but once a month is also ok!

medi

if you have any questions...


Version: 3.23.49a-log

So I have to check if it is " MyISAM " ?
Logged

Webby of salesplaza.nl
The YaBBSE buttongenerator : Click HERE !
Coyote
YaBB God
*****
Posts: 702


I love YaBB SE!


Re:Large message boards and MySQL logs of slow response
« Reply #67 on: May 01, 2002, 01:17:18 PM »
Reply with quote

OMG  :o

I have a small board of 179 members and 30,000 posts a month - and I thought the board was pretty slick as it was - I did not expect this to database change to make much difference. BUT IT DOES!!!!

Thanks guys!!!!
Logged

To the world - you are just one person, but to one person you are the world!
Jan Houtsma
Noobie
*
Posts: 31



WWW
Re:Large message boards and MySQL logs of slow response
« Reply #68 on: May 01, 2002, 01:27:39 PM »
Reply with quote


Mediman


can you tell me how and where to save / run the script??

just a bit new to this game ;)

thanks

Egg




php -f <filename> works as well but you will see the html tags in the responses.
Logged
Jan Houtsma
Noobie
*
Posts: 31



WWW
Re:Large message boards and MySQL logs of slow response
« Reply #69 on: May 01, 2002, 01:31:15 PM »
Reply with quote

Quote
Strange. My server is RH7.2 with mysql-3.23.41-1.

According to the script it should add indices and change the type to MyISAM. But everything already was MyISAM and all the indices were already there without running the script at all.

Jan

if you have ever had a 3.23 db then it is normal that your table type was already MyISAM, not a problem!
its just a secure feature to change anotherone to MyISAM!

the other thing (you have already had all indices is litte bit strange to me... but cool for you ;)

well, but you can use the second script to optimize (defrag) your tables from time to time!

medi
« Last Edit: May 02, 2002, 01:19:28 AM by mediman » Logged
Webby
Beta Tester
YaBB God
*****
Posts: 829


Some mistakes are too funny to make only once.


WWW
Re:Large message boards and MySQL logs of slow response
« Reply #70 on: May 01, 2002, 01:42:47 PM »
Reply with quote

Woohoo....it's a lot faster now !
Logged

Webby of salesplaza.nl
The YaBBSE buttongenerator : Click HERE !
WedgeAntilles250
Guest
Re:Large message boards and MySQL logs of slow response
« Reply #71 on: May 01, 2002, 02:08:09 PM »
Reply with quote

Ok, this is confusing.  Three different scripts to do the same thing....optimize the db.

Which one do I use?
Logged
mediman
Support Team
YaBB God
*****
Posts: 2858



WWW
Re:Large message boards and MySQL logs of slow response
« Reply #72 on: May 02, 2002, 01:24:40 AM »
Reply with quote

Ok, this is confusing.  Three different scripts to do the same thing....optimize the db.

Which one do I use?

if you never has optimized your db then use the 1st one! this change your table types to MyIsam, add indices and defrag, analyze your tables!

if you have already added the indices (all indices) then use the script without the "addindices" code!

both script you have to run once! (if yu run it more then once it will only not make any effect!

for your monthly optimize job, use then this

Code: [Select]
<?

$db_name = "";
$db_user = "";
$db_passwd = "";
$db_server = "localhost";

mysql_connect("$db_server","$db_user","$db_passwd");
$vers = mysql_get_server_info();
echo "We found a MySQL Server with Version <b>$vers</b> installed!<br>";
optimize();

function optimize() {
global $db_name;
mysql_select_db($db_name);
$tables=mysql_list_tables($db_name);
while (list($bla)=mysql_fetch_array($tables)) {
$result = mysql_query("ANALYZE TABLE $bla")or die("Invalid query");
echo "Table <font color=blue>".$bla."</font> analyzed and optimized!<br>";
}
}

?>
but if you have a mysql version 3.23.xx table only will optimized if you have table type MyISAM!

Sorry, i will make an "all in one" script to make it litte bit more usefull...

medi
« Last Edit: May 02, 2002, 01:30:16 AM by mediman » Logged

mainComm Dev Team
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!


WWW
Re:Large message boards and MySQL logs of slow response
« Reply #73 on: May 02, 2002, 01:42:42 AM »
Reply with quote

For Boardnation I built the optimization into a new page I added to the Admin center.  Maybe the code to optimize the db should be called each time someone visits the Admin center or a new page created that deals with db utility stuff, backing up, optimizing . . .
Logged

mediman
Support Team
YaBB God
*****
Posts: 2858



WWW
Re:Large message boards and MySQL logs of slow response
« Reply #74 on: May 02, 2002, 03:16:39 AM »
Reply with quote

this is a kewl idea!  8)

medi
Logged

mainComm Dev Team
Pages: 1 ... 3 4 [5] 6 7 ... 10 Reply Ignore Print 
YaBB SE Community  |  English User Help  |  FAQ  |  Topic: Large message boards and MySQL logs of slow response « previous next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.0.12 | SMF © 2016, Simple Machines
Valid XHTML 1.0! Valid CSS!
Page created in 0.14 seconds with 19 queries.