我有以下查询。我期待更新超过3.5亿行
update t
set [OC]=r.[OC]
from [dbo].[Vente MPX] t with (index (idocdate ))
INNER join [dbo].tempOCMPX r with (index (idoc))
on t.[Date Time] between r.[DATE DEBUT] and r.[DATE FIN]
--WHERE convert(date,t.[Date Time]) >= '2015-06-01'
--AND convert(date,t.[Date Time]) <= '2015-08-31'
WHERE t.[Date Time] >= '2015-01-01 00:0:00.000'
--AND r.[DATE DEBUT] <= '2015-08-31'
and t.[OC] is null
答案 0 :(得分:0)
当您需要更新数百万条记录时,我建议您按照以下步骤操作:
$('input[type=number]').val(function (index, currentValue) {
// sets the new value of each number-<input> to the
// result of the parsed current-value multiplied by
// the index of the current element in the collection
// returned by the selector:
return parseInt(currentValue, 10) * index;
});
开始,每次迭代开始一天/周/月并更新数据