|
SQL Server indexes - Posted on August 29, 2008 at 18:00
PM by Amit Satpute
Explain the 'Fillfactor' concept in Indexes.
The fill factor option is provided for smoothening index data storage and
performance.
The percentage of space on each leaf level page to be filled with data is
determined by the fill factor value When an index is created. This reserves a
percentage of free space for future growth.
How do you maintain a fill factor in existing indexes?
Usually the data keeps getting added, deleted, or updated in the table due to
which the fill factor is implemented during the index creation itself. Fill
factor is not maintained after an index is created.
The changes in the future can be determined only when a new index is created on
a table that has an existing data. It is beneficial to set the fill factor then
itself.
Maintaining extra space on the data pages obviates the purpose of using the fill
factor. The SQL Server would then have to split pages to maintain an amount of
free space per the fill factor, on each page.
Thus, when data is added filling up the empty space, an index can be created and
the fill factor can be re-specified distribute the data again.
What is it unwise to create wide clustered index keys?
A clustered index is a good choice for searching over a range of values. After
an indexed row is found, the remaining rows being adjacent to it can be found
easily. However, using wide keys with clustered indexes is not wise because
these keys are also used by the non-clustered indexes for look ups and are also
stored in every non-clustered index leaf entry.
What is full-text indexing?
Full text indexes are stored in the file system and are administered through the
database.
Only one full-text index is allowed for one table. They are grouped within the
same database in full-text catalogs and are created, managed and dropped using
wizards or stored procedures.
What is fill factor and pad index?
A fill factor is a specification done during the creation of indexes so that a
particular amount of space can be left on a leaf level page to decrease the
occurrence of page splits when the data has to be accommodated in the future.
A pad index specifies index padding. When it is set to ON, then the free space
percentage per the fill factor specification is applied to the
intermediate-level pages of the index. When it is set to OFF, the fill factor
is not specified and enough space is left for a maximum size row that an index
can have.
Describe important index characteristics.
The characteristics of the indexes are:
-
They fasten the searching of a row.
-
They are sorted by the Key values.
-
They are small and contain only a small number of columns of the table.
-
They refer for the appropriate block of the table with a key value.
The answers to following questions will be made available soon. Keep
visiting.
What is an index?
What are the types of indexes?
Describe the purpose and structure of indexes.
Explain the difference between clustered and non-clustered index.
Determine when an index is appropriate.
Syntax and an example for create, rename and delete index.
|