Now for my thesis project i need to make a lot of queries like the below
select * from tblMyTable where ItemName like '%item%'
Now my question : is that possible to create indexes for such queries ? If so what is the way of doing it ? Thank you.
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.Sign up to join this community
For LIKE queries this is not available.
But for making such queries SQL Server provides functionality called Full-text search. More info in MSDN.
index will work if you have something like
where ItemName like 'item%'
also contains works much faster than like, see this: http://www.docstoc.com/docs/2280727/Microsoft-SQL-Server-70-Full-Text-Search-What-is-full-text-search