In SQL Server 2012 does a wildcard search of '%text%' use the index? I read that in MySQL it doesn't.
Asked
Active
Viewed 104 times
1
-
3No, SQL Server **cannot** use any index if you search with a leading `%` and the `LIKE` operator. SQL Server will always have to do a full-table scan (or clustered index scan) – marc_s Dec 03 '15 at 21:23
-
@marc_s of course [contains](http://stackoverflow.com/questions/7510646/like-vs-contains-on-sql-server) is a different story – Conrad Frix Dec 03 '15 at 21:27
-
@ConradFrix: yes, absolutely - that's a word-based full-text search which has entirely different rules – marc_s Dec 03 '15 at 21:27
-
It would be quicker to look at the query execution plan and that will tell you what it's going to do – Rabbit Dec 03 '15 at 21:29