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,