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

有帮助吗?

解决方案

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).

许可以下: CC-BY-SA归因
不隶属于 dba.stackexchange
scroll top