Wednesday, May 27, 2009

Search Suffix using Full Text Search in SQL Server 2005

A solution to search Suffix is given below as its a limitation in FTS that FTS cannot search suffix.

Its not recommended and not efficient as it requires another column but its a solution which can help you out in some cases.


1. Add a column in your table which stores the reverse of the string
like
SET NewColumnName = REVERSE(ColumnName)

Tuesday, May 05, 2009

Identify missing indexes in sql server 2005

SELECT DISTINCT DB_NAME(Database_ID) [Database]
,OBJECT_NAME(Object_ID) [Table]
,Equality_Columns
,Included_Columns
FROM sys.dm_db_missing_index_details mid
WHERE Database_ID = DB_ID()
ORDER BY 2