gpt4 book ai didi

sql - 是否可以在 SQL Server 中同时运行 2 个查询

转载 作者:行者123 更新时间:2023-12-02 04:32:18 25 4
gpt4 key购买 nike

我想知道是否可以在 SQL Server 2014 中同时运行查询

这就是我想知道的原因。

Select * into #temp1 from table1

Select * into #temp2 from table2

假设第一行运行需要 15 秒,第二行需要 10 秒。如果我正常运行此查询,大约需要 25 秒。

如果我可以同时运行 2 行,则此查询只需 15 秒。

这可能吗?

谢谢

最佳答案

这两个查询是select * from two different tables (table1 and table2)insert data into two different temp table #temp1 and #temp2.​​

您可以同时运行这两个查询。每个 select * from.. into 的查询持续时间对另一个几乎没有影响。

关于sql - 是否可以在 SQL Server 中同时运行 2 个查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47551867/

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