Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Query is dead slow

$
0
0

declare @search varchar(100)

select id,name,grade from VCustomer(10 million records)

where cast(id as varchar) like @search +%

here id is bigint and cast operation used in where condition so query is getting slow.Please do the needful.How to avoid this cast opeartion in query.

Cheers,


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>