Skip to content

Latest commit

 

History

History
86 lines (57 loc) · 3.68 KB

configure-the-fill-factor-server-configuration-option.md

File metadata and controls

86 lines (57 loc) · 3.68 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Server configuration: fill factor
Learn about the fill factor option. See how to configure it to specify the percentage of space on each leaf-level page that SQL Server fills with data.
rwestMSFT
randolphwest
10/18/2024
sql
configuration
conceptual
fill factor option [SQL Server]

Server configuration: fill factor

[!INCLUDE SQL Server]

This article describes how to configure the fill factor server configuration option in [!INCLUDE ssnoversion] by using [!INCLUDE ssManStudioFull] or [!INCLUDE tsql]. Fill factor is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the rest as free space for future growth. For more information, see Specify Fill Factor for an Index.

Recommendations

This option is an advanced option and should be changed only by an experienced database administrator or certified [!INCLUDE ssNoVersion] professional.

Permissions

Execute permissions on sp_configure with no parameters or with only the first parameter are granted to all users by default. To execute sp_configure with both parameters to change a configuration option or to run the RECONFIGURE statement, a user must be granted the ALTER SETTINGS server-level permission. The ALTER SETTINGS permission is implicitly held by the sysadmin and serveradmin fixed server roles.

Use SQL Server Management Studio

  1. In Object Explorer, right-click a server and select Properties.

  2. Select the Database Settings node.

  3. In the Default index fill factor box, type or select the index fill factor that you want.

Use Transact-SQL

  1. Connect to the [!INCLUDE ssDE].

  2. From the Standard bar, select New Query.

  3. Copy and paste the following example into the query window and select Execute. This example shows how to use sp_configure to set the value of the fill factor option to 100.

    USE master;
    GO
    
    EXECUTE sp_configure 'show advanced options', 1;
    GO
    
    RECONFIGURE;
    GO
    
    EXECUTE sp_configure 'fill factor', 100;
    GO
    
    RECONFIGURE;
    GO
    
    EXECUTE sp_configure 'show advanced options', 0;
    GO
    
    RECONFIGURE;
    GO

For more information, see Server configuration options.

Follow up: After you configure the fill factor option

The server must be restarted before the setting can take effect.

Related content

  翻译: