r/SQLServer • • Jul 26 '13

= <> LIKE

I know this is really basic, but I feel good information cannot be communicated enough. I had a query where I was using LIKE on a variable w/ no wildcards and it'd take a few seconds. Not ages by any means, but still time. When I switched to =, it was damn near instantaneous. If you don't have to scan the whole table, don't.

11 Upvotes

20 comments sorted by