miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

Can I safely use SQL query OPTIMIZE TABLE?

 
Author kuopassa
Partaker
#1 | Posted: 13 Jan 2011 00:13 
MySQL has a defragmentation function called OPTIMIZE TABLE, which somehow helps to make database work faster. Query works like this:

OPTIMIZE TABLE MYMINIBBTABLE;

Can I run this safely with all tables that miniBB uses without the risk of doing something terribly devastating? :-)

Author Paul
Lead Developer 
#2 | Posted: 13 Jan 2011 04:11 
You might better ask this question on mySQL forums... miniBB uses just very standard tables. Try to create a backup of your database and then run this command, I think there should nothing terrible happen...

But I also think it won't help to really "optimize" the table - as soon as new records come in, it should be re-optimized each time again. This command is more for "static" databases I guess, which are optimized for heavy reading, not taking heavy writing into attention.

Author tom322
Active Member
#3 | Posted: 13 Jan 2011 12:33 
I used this OPTIMIZE TABLE from cpanel and it worked well..

Author kuopassa
Partaker
#4 | Posted: 13 Jan 2011 18:09 
tom322, did you use this from phpMyAdmin or is there some secret tool inside cPanel? Also if you used via phpMyAdmin, did you run this SQL query for all tables* and if so, is your forum now loading faster than before? I've got some almost ancient version of miniBB which is a bit bloated and can't use Paul's Archive function. Therefore I'm trying to find ways to make it run faster. :-]

*) All tables are:

- minibbtable_banned
- minibbtable_forums
- minibbtable_posts
- minibbtable_send_mails
- minibbtable_topics
- minibbtable_users

Author tom322
Active Member
#5 | Posted: 13 Jan 2011 18:45 
I tried both 'MySql Databases' (in cpanel click on the icon and then select 'Repair Database') and phpmyAdmin too - same effect. It may be safer to use it directly in 'MySql Databases' but I didn't have problem with any. Even though on phpmyAdmin you can select only tables which have overhead so it's a plus as it's probably faster then.

'MySql Databases' runs query for all tables; with phpmyAdmin you can run for either all or only selected tables.

Unless you have 2+MB overhead you probably won't see much difference in speed, it's like after oil change in your car maybe ;). If you use the Archives then the active database will get smaller and that's where you will notice speed increase.

Author Paul
Lead Developer 
#6 | Posted: 14 Jan 2011 04:15 
tom322:
If you use the Archives then the active database will get smaller and that's where you will notice speed increase.
That's true. mySQL optimizations could work temporary, but not all the time, and they highly depend on the size of tables. Actually, in miniBB there are only few tables which may contain lots of data - topics and posts. That's what the archiving is created for, so I better recommend you still to upgrade your forum... some how...

Author kuopassa
Partaker
#7 | Posted: 14 Jan 2011 18:37 
OK, thanks for commenting this. I ran that query in phpMyAdmin and it didn't break anything. Forum is loading now a bit faster than before, but I don't know if that is just placebo effect.

Master Class miniBB Support Forums / Master Class /
 Can I safely use SQL query OPTIMIZE TABLE?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑