<%= OutputCSS() %>
Optimization Management :       Help
<% if request("done")<>"" then response.write "
Optimization Successful.
" Dim strSQL,completion,objCommand, turnonoroff, objRS,arrUpfiles,objFSO,deletefile,iFile server.scripttimeout = 2000 SELECT CASE request("DO") case "recounttotalreply" strSQL = "spRecountTotalReply" case "updatefulltextindex" strSQL = "spUpdateFullTextIndex" case "cleanattach" strSQL = "spCleanAttachment" case "rebuildfastsort" strSQL = "sprebuildfastsort" case "defragfastsort" strSQL = "spdefragfastsort" case "recountpost" strSQL = "spUpdatePostCount" case "cleansubscription" strSQL = "spSubCleanUp" case "recountforum" strSQL = "spRecountAllForums" case "On" Application.lock Application(dbName&"boarddown") = 0 Application.unlock strSQL = "spTurnOnOff (0)" case "Off" Application.lock Application(dbName&"boarddown") = 1 Application.unlock strSQL = "spTurnOnOff (1)" end select if Application(dbName&"boarddown") = 0 then turnonoroff = "Off" else turnonoroff = "On" if strSQL<>"" then set objCommand = Server.CreateObject("ADODB.Command") with objCommand .ActiveConnection= datastore .commandTimeout = 200 .CommandText = dbOwnerPrefix&strSQL .CommandType = adCmdStoredProc if request("DO") = "cleanattach" then set objRS = .execute if not (objRS.EOF AND objRS.BOF) then arrUpfiles = objRS.getRows end if objRS.close set objRS = nothing else .execute , ,adExecuteNoRecords end if end with set objCommand=nothing if request("DO") = "recountforum" then call updateForum if request("DO") = "cleanattach" then if isArray(arrUpfiles) then set objFSO = Server.CreateObject("Scripting.FileSystemObject") with objFSO for iFile = 0 to ubound(arrUpfiles,2) Dim i, arrUps:arrUps=split(arrUpfiles(0,iFile),"|") for i = 0 to ubound(arrUps) deletefile = server.mappath("upfiles/"&arrUpfiles(1,iFile)&"/"&arrUps(i)) if .fileexists(deletefile) then .DeleteFile deletefile, true next next end with set objFSO = nothing end if end if response.redirect("admin_defrag_rebuild.asp?done=yes") end if %>
> > <% if Application(dbName&"searchmode") = "full text" then %> > <% end if %> > > > > > > >
Which Optimization Operation Do You Want To Carry Out?
This is the most efficient way to improve the performance of the forum. Like hard disks, Indices in database become cluttered after extensive use. If you notice a minor decrease in performance, click the button on the left, otherwise, don't touch it.
>This is to improve the performance of the board (like the option above), but this option takes a step further by rebuilding the entire indices used by the forum. Note, use of this option may pause your forum for up to 1 min. (depending on the number of messages stored on your forum), so proceed with caution. Only use this option when the performance is unacceptable. You may want to shut down the entire forum by clicking on the button below before proceeding.
>This option will update full-text index by the "Incremental" method. Full-Text index will not be updated automatically unless you schedule a job on SQL Server itself (not every ISP allows you to do this). You could also use the "Change Tracking" method to update the full-text index in real time but doing so will hurt your forum's performance seriously if you are hosting a busy forum. This option on the other hand can be used to maintain and update the index whenever you want it done.

Please note that updating an index will consume serious amount of CPU time and RAM (if you haven't updated your index for a while), and therefore it will be better if you turn off the entire forum first. Please don't forget that updating index will also increase SQL log file considerably, and therefore, don't forget to trim down the log file after each full-text index update.
>This option will recount the total reply column for all inconsistent threads. Admins of Snitz converted forums should at least run this once. In a normal situation, you shouldn't need to click on this button at all.
>This option will recount all user's total posts, making the total post count consistent after a deletion of a forum. Don't use this option after you delete a thread or a message because the post count is automatically calculated after a thread or a message has been deleted. This is an intensive process to the SQL server and therefore it is better to shut down the forum first to prevent service interruption.
>This option will recount topics and total posts for all forums. If you are not sure that the forum post counters are correct, use this option.
>This option will clean up orphan attachment (attachment not associated with any post). This option can be run once a week or once a month depending on how you configure the forum.
>This option will clean up subscription table. Only run this once a month or after a massive deletion of posts. Even if you don't clean up subscription table, you forum won't get affected.
.gif" align="absmiddle" border="0"> >This option will shut the entire board down (prevent public access), however, administrator access is not affected by this option. Use this option when you want to backup your forum's database or perform any network maintenance that may result in temporary inaccessibility of your forum. For example, if you want to rebuild index (see above).
>This option will reset the forum. If you believe the application cache has corrupted or something has gone seriously wrong, click on this button. This button is not meant to be used, and clicking on it will reset all application variables + delete all session records. However, this button does no harm to the system (only cache and session are reset), so it is safe to play with it :) NOTE: The main window (where the forum is) will refresh, but not this admin panel.