Database Sweep Interval Setting To Improve Performance

Database Sweep Interval Setting To Improve Performance

Amending the Database Sweep Interval Setting

Overview:

On some large databases, performance issues maybe experienced due to the database Sweep Interval setting being set at a higher level than need be. By default the Sweep Interval setting is set to 20000 records. However this can create performance issues if transactional volumes are high. Re-setting this sweep value to ‘0’ (Zero) will prevent the database from storing ‘garbage’ or roll back transactions. This stops the sweep process entirely which can slow down performance as it can take much of the servers resources to perform a Sweep to remove redundant ‘garbage’ records.

NB: There is an offset to this, which means the database will require more frequent Validation / Backups and Restores to remove this ‘garbage’ from the database before it starts to bloat the size of the file. Of course, these housekeeping procedures should be run frequently as they also re-build Indexes which are in essence ‘pointers’ within the database referring to actual records.

For more information on Sweep please refer to this article http://www.firebirdfaq.org/faq312/


Determining the Sweep Interval and Amending it:

Firstly, check the current Database Sweep setting by downloading the attached Command script

Run this command script to determine the current Sweep Interval setting. If the setting is greater that 0, then proceed with the actions below to amend that setting.



Modifying the Database Sweep Interval Setting:
You must have exclusive access to do this database. Ensure you stop any Ostendo API, Web or Queue Services before amending this setting

Run cmd (Run as Administrator)

cd c:\program files\firebird\firebird_2_5\bin directory

Define the following two variables, it makes life easier, in that you do not have to type in the user name and password every time you issue a command.

                SET ISC_USER=SYSDBA

                SET ISC_PASSWORD=masterkey

 

substitute your database path and name as necessary (NB: The database path must 

                gfix -h 0 c:\Database\Ostendo.fdb

 

Now check to see the Sweep Interval was change successfully by logging back onto Ostendo and re-running the Command script.

Finally run the dbutiles.exe to perform the following:

  1. Validation
  2. Backup
  3. Restore

    • Related Articles

    • Increasing Firebird Performance

      Below are links to two articles relating to potentially increasing Firebird Performance https://ib-aid.com/en/articles/how-to-make-firebird-work-20-faster-at-windows-server-2016-in-less-than-1-minute/ ...
    • Firebird Restart to improve performance and remove External Users

      Firebird Stop / Start process Large Ostendo sites running 20+ users should stop and re-start Firebird on a regular basis to ensure performance is maintained. The major issue to automating this process in the past has been the worry that users may ...
    • Improving Performance of Opening Lists

      As a database gets larger, the opening List grids can take longer to load, when 'Include Closed' Orders, 'Include Updated Status' or 'Include Fully Paid' is turned on along with Filtering and Sorting from the Grid options. This is because in order to ...
    • Ostendo running slowly

      Some of the most common factors that could influence speed are: 1) Firebird database needs to be backed up & restored (effectively fixes indexing or data issues) 2) The server is not optimised as a database server (i.e. the disk configuration is ...
    • Performance Speed Test

      Sometimes it can be useful to conduct a speed test in order to benchmark read / write speed in a database. This is useful when attempting to diagnose a performance problem on a specific database within different environments. By running the speed ...