I have a procedure it takes long time to run this procedure
alter procedure test as
declare @Id int,@Type char(10),@total_created int,@total_orders_created int,@total_completed int,@log_total int,@log_aging int
declare c1 cursor for
select Id,Type
from temp1
open c1
fetch next from c1 into...