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
  #12  
Old 07-28-2004, 04:23 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks

installed and clicked
Reply With Quote
  #13  
Old 07-28-2004, 04:55 PM
Gamingforce's Avatar
Gamingforce Gamingforce is offline
 
Join Date: Oct 2001
Location: New York City
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1.00 -> 1.01 - July 28, 2004
  • Added sleep code that adds a pause after each database process. (Thanks KirbyDE)
To update, simply upload the new dboptimize.php script found in the zip attachment in the first post of this thread.
Reply With Quote
  #14  
Old 07-28-2004, 09:40 PM
Gamingforce's Avatar
Gamingforce Gamingforce is offline
 
Join Date: Oct 2001
Location: New York City
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SaN-DeeP
thnx for nice hack GamingForce.
but just a small query is this useful for small boards ?
lets say which have 50,000 - 60,000 posts ?

Regards,
It's useful regardless of the amount of posts your board has.
Reply With Quote
  #15  
Old 07-28-2004, 11:32 PM
Zoints Zoints is offline
 
Join Date: Feb 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is the difference between this and the vbulletin repair/optize function that is built in (other than being automatic of course).

Thanks.
Reply With Quote
  #16  
Old 07-28-2004, 11:55 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thegunowner149
What is the difference between this and the vbulletin repair/optize function that is built in (other than being automatic of course).

Thanks.
I dont think there is one, at least not that i can tell.
Reply With Quote
  #17  
Old 07-29-2004, 02:23 AM
Highlander Highlander is offline
 
Join Date: Apr 2002
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its automatic thats different and it uses the sleep command
Reply With Quote
  #18  
Old 07-29-2004, 03:24 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not too sure of running an optimize table function automatically like this. There is a small but real risk of database corruption. Make sure you run a backup script daily as well if you're going to do this before optimizing your tables (something you should always do anyway).
Reply With Quote
  #19  
Old 07-29-2004, 06:49 PM
Gamingforce's Avatar
Gamingforce Gamingforce is offline
 
Join Date: Oct 2001
Location: New York City
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've never heard of database corruption through the optimize function?
Reply With Quote
  #20  
Old 07-29-2004, 07:03 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gamingforce
I've never heard of database corruption through the optimize function?
Neither have I - in fact, OPTIMIZE TABLE has REPAIR built-in, so if a table is corrupted this will repair it as well. However, unless you are going to switch off your forums, running OPTIMIZE on a live database runs a small risk of something wrong happening. That's all I'm saying.
Reply With Quote
  #21  
Old 07-30-2004, 01:30 AM
tcs's Avatar
tcs tcs is offline
 
Join Date: Jun 2002
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin is correct. The hack is good and I will run it knowing the dangers. Wouldn't take much to add a repair to it before optimize.
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 10:30 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.04815 seconds
  • Memory Usage 2,302KB
  • Queries Executed 25 (?)
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
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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