Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Nightly Database Optimizer Details »»
Nightly Database Optimizer
Version: 1.00, by Gamingforce Gamingforce is offline
Developer Last Online: Jan 2007 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 07-27-2004 Last Update: Never Installs: 35
 
No support by the author.

[ Feature Description ]
This is a simple, very easy to install hack that automatically optimizes your database daily! The optimizer uses MySQL's 'optimize table' function. In simple terms, you can look at the optimize command as a hard drive defragmenter. It reclaims lost space and defragments the database file.

By default, this modification runs the optimize script nightly at 3:22 AM (which statistically on my board is the least busiest time). You can run it weekly, monthly or whenever you want by changing the settings under the Scheduled Task Manager.

The script includes all the tables that get heavy daily activity. You can easily add other tables if you wish by opening up the dboptimize.php file and simply adding extra table names to the end of the list.

[ Version Fix Log ]
1.00 -> 1.01 - July 28, 2004
  • Added sleep code that adds a pause after each database process. (Thanks KirbyDE)
Enjoy!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 12-23-2004, 09:45 AM
barnest2 barnest2 is offline
 
Join Date: Jun 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exactly what I've been looking for!
Reply With Quote
  #43  
Old 12-23-2004, 01:00 PM
TwinsX2Dad TwinsX2Dad is offline
 
Join Date: Oct 2004
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gamingforce
I really do think it's 100% safe because MySQL locks the table from updates/inserts while it's optimizing it.
You are 100% correct. No danger in optimizing while the board is live UNLESS you were also manually changing the DB - even then, the risk is so slight as to not be concerned.

Quote:
Originally Posted by Loki12
Is anyone going to answer this question?
There is no difference between this process and the vB optimize/repair feature, which is just an overlay to doing it directly in your DB, except that this is automatic.

When running a DB process like this, you can choose 'repair' which simply fixes corrupted tables, which are repairable. You can also choose 'optimize' which first repairs (if needed), then optimizes (removes dupes and unneeded entries). You can always use 'optimize' unless you're manually editing the DB and trying to find out what is happening.

This hack uses the 'optimize' command. I guess if you were to need to manually work your DB, a process few have a handle on, you could disable this hack, do your work, then enable it when all is done.

I've run automated DB optimization scripts for a long time - on vB (or IPB) databases, as well as DBs for other purposes and I've never had a problem. The difference between those scripts and this one is that this is housed within vB and is free.

So, go ahead and use it. It is a good thing.
Reply With Quote
  #44  
Old 02-11-2005, 06:42 AM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As stated earlier, the docs say it isn't needed to run this that often.But what definitely does benefit the server is running analyze.
http://dev.mysql.com/doc/mysql/en/analyze-table.html

In the optimize section they said optimize is mapped to analyze. Idon't know if that means analyze is done along with optimize, butanalyze can by itself make mysql do a quicker job returning data injoins and the difference can at times be dramatic.
Reply With Quote
  #45  
Old 02-12-2005, 12:33 PM
Elfo King Elfo King is offline
 
Join Date: Apr 2003
Location: Pisa-Italy
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is possible to modify it for repair and optimize for all table ?

Thx !
Reply With Quote
  #46  
Old 02-04-2006, 01:21 AM
Borimikan Borimikan is offline
 
Join Date: Apr 2005
Location: Brooklyn, NY
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sows this work for 3.5.3?
Reply With Quote
  #47  
Old 08-10-2007, 11:35 AM
Fenriz Fenriz is offline
 
Join Date: Aug 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to make the same for 3.6.8? Please......
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04376 seconds
  • Memory Usage 2,265KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete