SQL Server Indexing Interview Question and Answers - Part 1

Tuesday, June 19, 2012

1. What is a Covering Index ?
An index that is constructed such that SQL Server can completely satisfy queries by reading only the index is called a covering index.
2. What is a Filtered Index ?
A fi ltered index is simply an index with a WHERE clause.
3. What is a Fillfactor ?
To control the rate at which page splits occur, you can specify a fi ll factor for the index. FILLFACTOR specifies the percentage of free space that should be left on the leaf level of an index during creation or rebuild.
4. What happens when an Index is created with ONLINE = ON?
When an index is created using the ONLINE = ON option, SQL Server allows changes to the table during the creation of the index by using the version store within the tempdb database.
5. How much of Data an XML datatype can hold ?
An XML data type can contain up to 2 gigabytes (GB) of data in a single column.
6. What is an XML Index ?
To improve the performance of queries against XML data, you can create a special type of index called an XML index. There are 2 types of indexs : primary and secondary. Primary: A primary XML index is built against all the nodes within the XML column. Secondary : Secondary indexes are created on PATH, VALUE, or PROPERTY.
7. What are Spatial indexes ?
Indexes created on geometry or geography are called Spatial indexes.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is an Covering Index ?

Thursday, June 7, 2012

An index that is constructed such that SQL Server can completely satisfy queries by reading only the index is called a covering index.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the maximum no of NonClustered indexes for a table?

1000

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is a Forwarding Pointer ?

If SQL Server must move the row by subsequent modifi cations, such as a page split or the row no longer fi ts on the data page, SQL Server does not update the nonclustered index with the new location of the row. Instead, SQL Server creates a forwarding pointer on the data page pointing to the new location of the row.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the maxium size of the Index Key?

900 bytes

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the maximum columns you can create an Index with ?

16

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is a torn page in SQL Server ?

Tuesday, June 5, 2012

Data pages are 8 kilobytes (KB) in size, but SQL Server divides a page into 16 blocks of 512 bytes apiece when performing write operations. If SQL Server begins writing blocks on a page and the disk system fails in the middle of the write process, only a portion of the page is written successfully, producing a problem called a torn page.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

How will you track and log damaged pages ?

by enabling the PAGE_VERIFY CHECKSUM option.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the purpose of the transaction log?

Sunday, June 3, 2012

The transaction log records every change that occurs within a database to persist all transactions to disk.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the types of files that you create for databases and what are the commonly used

You can create data and log files for a database. Data files commonly have either an .mdf or .ndf extension, whereas log files have an .ldf extension

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is Check pointing in SQL Server ?

If you are adding new data to a database, the new data is first written to a memory buffer, then written to the transaction log, and finally persisted to a data file via a background process called check pointing.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

LinkWithin

Blog Widget by LinkWithin

Recommended Books