Monthly Archives: March 2008

Filtered Index Design Guidelines

Filtered Index Design Guidelines A filtered index is an optimized nonclustered index, especially suited to cover queries that select from a well-defined subset of data. It uses a filter predicate to index a portion of rows in the table. A … Continue reading

Posted in SQL Server 2008 | Leave a comment

Statistics Used by the Query Optimizer in Microsoft SQL Server 2005 (Microsoft TechNet SQL Server)

Statistics Used by the Query Optimizer in Microsoft SQL Server 2005 (Microsoft TechNet SQL Server TechCenter) Microsoft SQL Server 2005 collects statistical information about indexes and column data stored in the database. These statistics are used by the SQL Server … Continue reading

Posted in SQL Server 2005 | Leave a comment

Getting the list of columns for a table

SELECT TOP 1STUFF((SELECT ‘, ‘ + T2.COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS AS T2 WHERE T2.TABLE_NAME = T1.TABLE_NAME FOR XML PATH (”)), 1, 2,”) AS COL_NAMESFROM INFORMATION_SCHEMA.COLUMNS AS T1WHERE T1.TABLE_NAME = ‘CONCISE_DATA’ORDER BY T1.ORDINAL_POSITION Getting the list of columns for a table

Posted in Uncategorized | Leave a comment