gpt4 book ai didi

sql - 更新语句执行时间过长

转载 作者:行者123 更新时间:2023-12-04 14:45:01 26 4
gpt4 key购买 nike

我正在运行一个简单的更新语句。执行时间太长。这是更新和索引的详细信息。

导出列的默认值为 0

UPDATE PAR_ITM SET exported = -1 WHERE exported < 1

索引:
CREATE NONCLUSTERED INDEX [IX_PAR_ITM_Exported_1]
ON [dbo].[PAR_ITM] ([exported] ASC)
WITH (
PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = ON, SORT_IN_TEMPDB = OFF,
IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80
) ON [PRIMARY]

最佳答案

因此,您将导出设置为 -1,其中导出已等于 -1。也许将您的 was 子句更改为 WHERE export = 0 会减少行数?

关于sql - 更新语句执行时间过长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7285684/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com