Show TOC

BT_PREFETCH_SIZE OptionLocate this document in the navigation structure

Restricts the size of the read-ahead buffer for the High_Group B-tree.

Allowed Values

0 – 100. Setting to 0 disables B-tree prefetch.

Default

10

Scope

Option can be set at the database (PUBLIC) or user level. At the database level, the value becomes the default for any new user, but has no impact on existing users. At the user level, overrides the PUBLIC value for that user only. No system privilege is required to set option for self. System privilege is required to set at database level or at user level for any user other than self.

Requires the SET ANY PUBLIC OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Remarks

B-tree prefetch is activated by default for any sequential access to the High_Group index such as INSERT, large DELETE, range predicates, and DBCC (Database Consistency Checker) commands.

BT_PREFETCH_SIZE limits the size of the read-ahead buffer for B-tree pages. Reducing prefetch size frees buffers, but also degrades performance at some point. Increasing prefetch size might have marginal returns. This option should be used in conjunction with the options PREFETCH_GARRAY_PERCENT, GARRAY_INSERT_PREFETCH_SIZE, and GARRAY_RO_PREFETCH_SIZE for non-unique High_Group indexes.