vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Nightly Database Optimizer (https://vborg.vbsupport.ru/showthread.php?t=67711)

Gamingforce 07-27-2004 10:00 PM

Nightly Database Optimizer
 
[ 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! :)

Ghostsuit 07-28-2004 01:08 AM

I think a PHP script might ground to a halt on my database but nice hack.

Gamingforce 07-28-2004 04:01 AM

The optimization happens at off peak times and content is still accessible during the optimization process. I have a board with almost a million posts and it works fine.

Phalynx 07-28-2004 07:17 AM

usefull, thanks! *install*

Skyline_GT 07-28-2004 08:01 AM

so this is similer to the repair feature in vb?

SaN-DeeP 07-28-2004 08:06 AM

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,

sabret00the 07-28-2004 10:05 AM

how long have you been running it gaming force as i would fear that it would currupt some data one in a freak accident that would cos me :(

nexialys 07-28-2004 11:10 AM

to make the script to not stuck the server and the db process, inside the code, just after
PHP Code:

    $tempcount++; 

add this, so it will add a second of pause:
PHP Code:

for ($i=0$i 1000$i++) {
   
// do nothing, 1000 times



Andreas 07-28-2004 11:23 AM

Quote:

Originally Posted by nexialys
PHP Code:

    $tempcount++; 

add this, so it will add a second of pause:
PHP Code:

for ($i=0$i 1000$i++) {
   
// do nothing, 1000 times



Erm ... that causes unnecessary CPU load (if PHP isn't smart enough to just skip this).

Better use
PHP Code:

sleep(1); 

:)

nexialys 07-28-2004 11:49 AM

hum, ya, i forgot sleep()... thanks KirbyDE


All times are GMT. The time now is 08:24 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.01140 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete