Unique Keys Editor (SQL Server)

From RapidSQL
Jump to: navigation, search

Go Up to Microsoft SQL Server Object Editors

The Unique Keys Editor lets you manage columns and properties for a unique key and view associated statistics.

To edit a unique key

  1. Open an editor on the unique key. For details, see Opening an Object Editor.
  2. Use the following table as a guide to understanding and modifying the settings on the tabs of this editor:
Tab Settings and tasks

Columns

Lets you manage columns that make up the unique key. On opening, this tab shows the existing columns. For each column, the listing displays the datatype (and if applicable the precision in brackets) and whether the table definition permits nulls in the target table column. Optionally you can:

Change the Sort order of a column.

Click the New button and select a column name from the dropdown, to add a column to the index.

Select a column and click the Drop button to delete the column from the index.

Select a column and use the arrow buttons to reorder the columns in the index.

Properties

Lets you work with settings in the following categories:

Creation

In addition to displaying identifying information, you can modify the Build Online and Max degree of parallelism properties. For details on these properties, see Unique Keys Wizard (SQL Server).

Attributes

Clustered - Indicates whether the target index is clustered. Ignore Duplicate Key - Indicates whether the target primary key ignores duplicate key values. If you select his option, the transaction that generated the duplicate key values can continue. Statistics Recompute - Indicates that index statistics are automatically recomputed as the index is updated. Microsoft does not recommend this.

Storage

File Group - Lets you specify the filegroup on which to place the index. This is for Microsoft SQL Server 7.0 or later. Fill Factor - Lets you specify a percentage that indicates how full Microsoft SQL Server should make the leaf level of each index page during index creation. When an index page fills up, Microsoft SQL Server must take time to split the index page to make room for new rows, which is quite expensive. For update-intensive tables, a properly chosen Fill factor value yields better update performance than an improper Fill factor value. Pad Index - If you specified a Fill factor of more than 0 percent, and you selected the option to create a unique index, you can specify to use the same percentage you specified in Fill Factor as the space to leave open on each interior node. By default, Microsoft SQL Server sets a 2 row index size.

Statistics

Displays statistics in the following categories:

Page Statistics

Data Pages, Pages Reserved, Used Pages, and Total Pages Modified.

Row Statistics

Maximum Row Size, Minimum Row Size, Max Size of Non-Leaf Index Row, and Total Rows Modified Since Last.

DDL View

For details on using this tab, see Viewing the SQL/DDL for an Object.

3. When finished, you can submit your changes. For details, see Previewing and Submitting Object Editor Changes.
Personal tools