相对于批次的查询成本为100% [英] Query cost relative to batch is 100%
本文介绍了相对于批次的查询成本为100%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不确定如何解释,但是我在sql server 2005中运行的所有查询的查询成本(相对于批次)"为100%.有什么办法可以降低成本?
I'm not sure sure how to interpret this, but all the queries I run in sql server 2005 have a "query cost (relative to batch)" of 100%. Is there any way to reduce the cost?
推荐答案
如果您的批次(在给定调用中执行的操作)有一个查询,则该查询占该批次的相对%,因为它是该批次中的唯一查询.
If your batch (what you are executing within a given call) has one query then relative to that batch that query takes up 100% as it is the only query within that batch.
即:
BEGIN
SELECT * FROM table -- Will be 100% of batch
END
BEGIN
SELECT * FROM table -- Will be 50% of batch
SELECT * FROM table -- Will be 50% of batch
END
SELECT * FROM table -- Will be 100% of batch (implicit begin/end around it)
这篇关于相对于批次的查询成本为100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文