Find, Find Next on an index, in SQL?
On Feb 6, 2018, at 15:34, Das Goravani <email@example.com> wrote:
> Others are telling me strongly to avoid LIKE because it does a whole table search. I like LIKE because it does just what I want, I don’t like whole table searches. I’m not sure who is right, you or them, when it comes to like. Thank you for this clarification below.
There are plenty of ways to optimize your database queries. I tend to worry about making the code work, then worry about tuning for performance. Of course, don’t write needlessly poor code. Quite the opposite—code that’s clean and east to test and maintain is far better than a tightly optimized pile of spaghetti.
I don’t know what the size of your datasets or the specs on your servers are. We’ve used ILIKEs for character searches for 15+ years without performance issues.