English 中文(简体)
如果不利用大量资源,这一困境需要这么多的时间?
原标题:How is it possible that this Query takes so much time without using much resources?

我拥有服务器简介仪(在批量上填写),发现一个运行时间很长的查询。 这些是最长五个长期查询的利用统计数据:

Count   Duration    CPU     Reads   Writes
1       1237757030  608     47979   10
14695   358668961   355928  4818709 315
3501    48323496    43705   625474  17 
75883   46373094    45250   8526977 127
34      35394031    10200   2461621 0

The first one runs nearly 3 times longer than the second, even though the second has a much larger cumulative CPU time and number of reads than the first one. How could this be, or how can I find out more about what is happening here?

最佳回答

Usually this is caused by some kind resource contention. In other words, your query is idle while waiting for locks to be released (blocking), data to be read from disk, waiting for threads to complete their work etc.

它是一个深重的问题,但我建议从研究你的等待情况开始。

了解全心全意的等待状况,看看ys。 总部:

“Specific types of wait times during query execution can indicate bottlenecks or stall points within the query. Similarly, high wait times, or wait counts server wide can indicate bottlenecks or hot spots in interaction query interactions within the server instance.”

你也可以提出疑问,试图找出阻碍问题。 这里有一条关于这一主题的良好条款。

http://www.simple-talk.com/sql/sql-tools/how-to-identification-blocking-problems-with-sql-profiler/

这些领域是几个需要研究的领域,但坦率地说,有许多变数,如果无法获得你的服务器,除了提供电梯和提出建议外,任何其他东西都难以想象。

问题回答

暂无回答




相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签