-2

I am optimizing my application, while this task, I find one query which is fetching data from database using like . and database rows are around 10000.

So is this a good way to use like in query or I should fetch data from database and then process at server side language, like in JAVA

I need opinion, Please provide your valuable inputs

Thanks in advance

3

Optimizing in SQL Server is (to large extent) about reducing resource usage. LIKE gives you the ability to seek in an index (if you don't have a wildcard in beginning), and also return less data from the operator (and in the end to the client). I very much doubt that any advantages can be achieved by doing such filtering in the client app instead. But, of course, there can be additional consideration to your example that you didn't disclose (not much info was given).

  • Thanks for your suggestions, they are realy helpful, and this help to resolve the performance! Thanks alot – Dupinder Singh Jul 4 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.