我们可以同时在存储过程中执行不同的查询吗? [英] can we execute different queries in a stored procedure same time?

查看:91
本文介绍了我们可以同时在存储过程中执行不同的查询吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我的存储过程中,有8个查询用于8个表.每个查询都有联接和子查询.我正在传递参数&来自
的存储过程名称
前端(在asp.net 3.5中设计)

我们是否可以同时执行8个查询,即并行执行,以便我可以最大程度地减少存储过程的执行时间?



问候,

N.SRIRAM

Hi All,

In my stored procedure there are 8 queries for 8 tables.Each query has joins and sub queries. I am passing parameters & stored procedure name from

front end(designed in asp.net 3.5)

can we execute that 8 queries at the same time i.e. parallel execution so that I can minimize stored procedure execution time?



Regards,

N.SRIRAM

推荐答案

不,您不能并行运行多个查询.

如果性能是您的问题,请寻求优化查询或对表进行规范化.
No you can''t run multiple queries in parallel.

If performance is your issue, look to optimize your query or normalize your tables.


如果您的问题是有关在SP中运行多个查询,那么我会说是的.

但是所有查询都不并行执行,而是一个接一个地执行.

请参见 [ MSDN [
If your question is about running multiple query in SP then I will say YES it is possible.

But All the query doesn''t executing parallel but it''s one after another.

See THIS[^] clear your thoughts regarding Stored procedure. and you can refer MSDN[^] also.


这篇关于我们可以同时在存储过程中执行不同的查询吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆