BTSCANNER Configuration Parameter

Use the BTSCANNER configuration parameter to set the B-tree scanner. The B-tree scanner improves transaction processing for logged databases when rows are deleted from a table with indexes. The B-tree scanner threads remove deleted index entries and rebalance the index nodes. The B-tree scanner automatically determines which index items are to be deleted.

onconfig.std value
BTSCANNER num=1,threshold=5000,rangesize=-1,alice=6,compression=default
range of values
See the Usage section.
separators
Use a comma between each field.
takes effect
After you edit your onconfig file and restart the database server.
When you reset the value dynamically in your onconfig file by running the onmode -C command.
After you run the SQL administration API task() or admin() function with the onmode and C arguments.

Usage

By default, the BTSCANNER configuration parameter starts one index cleaner thread, prioritizes cleaning indexes that have over 5000 deleted items, automatically adjusts the mode of index cleaning, and merges index pages at a level appropriate for indexes that have moderate growth and changes.

Figure 1: Syntax for the BTSCANNER configuration parameter

1  BTSCANNER?  num =
2.1! 1
2.1 threads
1 ,?  threshold = thresh_size ,?  rangesize = 100 ,?  alice = alice_mode ,?  compression =
2.1! default
2.1 low
2.1 med
2.1 high
Table 1. Options for the BTSCANNER configuration parameter value
Field Values
num The threads value is a positive integer that sets the number of B-tree scanner threads to start at system startup. The default is 1.
threshold The thresh_size value is the minimum number of deleted items an index must encounter before an index is prioritized for cleaning. The default is 5000.
rangesize Specifies whether to allow leaf scans for small indexes:
  • -1 = Off. The alice mode is used for all index cleaning.
  • 100 = Small indexes are scanned by the leaf scan method.
alice The alice_mode value controls index cleaning:
  • 0 = Off.
  • 1 = Uses exactly 8 bytes of memory.
  • 2 = Uses exactly 16 bytes of memory.
  • 3 - 12 = Default is 6. Sets the initial amount of memory that is used for index cleaning. Subsequently, the B-tree scanners automatically adjust the mode based on the efficiency of past cleaning operations.
compression The level at which two partially used index pages are merged:
  • low = Use if you expect an index to grow quickly with frequent splits.
  • med or default = Default. Use if an index has moderate growth or changes.
  • high = Use if an index is 90 percent or more read-only or does not have many changes.

After all of the indexes above the threshold are cleaned, the indexes below the threshold are added to the prioritized list of indexes to be cleaned. Systems updated frequently should increase this value by a factor of 10 times or 100 times.