I found one big issue.
I have added the Lower function to indexed column of one of the table to fetch the data.
The table contains more than 100K records.
While fetching the records, the cpu usage goes to 100%.
I could not understand, how this much drastic change can happen just because of Lower() function.
Please Help!
What you could do, if you really need this query a lot, is create a persisted computed column that uses the LOWER() function. Index that column and you should be fine again:
That would keep a lower-case representation of your field in your table, it’s always up to date, and since it’s persisted, it’s part of your table and doesn’t incur the penalty of the LOWER() function. Put an index on it and your search should be as fast as it was before.
Links: