我在Server中有16000行,我想将文档号物理地分配给记录,并且使用下面的代码,当我的记录是8000时,它可以工作得很好,但是当记录增加到16000时,它会给我一个超时错误,请帮助我提高我的查询的性能?set @NewDoc=0
declare t1_cursor cursor dynamic for select documentheaderid,documentnumber from Accounting.DocumentHeader where FinancialPeriodFK=@FinancialPeriodFK and Date&g