我正在使用一个存储过程,它返回多个结果集并花费大量时间来执行。我必须将这些结果集绑定到前端的控件。但是显示结果也需要很多时间,并且没有更改存储过程的选项。那我还能尝试什么呢?
Here is my stored proc,
ALTER PROCEDURE [dbo].[sp_getdata]
@Week int = 1,
@Year int = 2014
AS
BEGIN
declare @current_week int
set @current_week = datepart (week, getdate())
while @Week <= @current_week
begin
exec SP_GetResults_New @Week,@Year
set @Week = @Week + 1
end
END
Thanks.