请问,这题为什么选 D,是答案错了吗?请帮着分析一下

listhome 2012-03-01 01:57:14
You are tasked to analyze blocking behavior of the following query:
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
WITH Customers AS (
SELECT *
FROM Customer ),
SalesTotal AS (
SELECT CustomerId, SUM(OrderTotal) AS AllOrderTotal
FROM SalesOrder)
SELECT CustomerId, AllOrderTotal
FROM SalesTotal
WHERE AllOrderTotal > 10000.00;
You need to determine if other queries that are using the Customer table will be blocked by this query. You
also need to determine if this query will be blocked by other queries that are using the Customer table.
What behavior should you expect?
A. The other queries will be blocked by this query. The safer , easier way to help you pass any IT exams.
48 / 80
This query will be blocked by the other queries.
B. The other queries will be blocked by this query.
This query will not be blocked by the other queries.
C. The other queries will not be blocked by this query.
This query will be blocked by the other queries.
D. The other queries will not be blocked by this query.
This query will not be blocked by the other queries
...全文
147 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
叶子 2012-03-07
  • 打赏
  • 举报
回复

--You are tasked to analyze blocking behavior of the following query:
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
WITH Customers
AS ( SELECT *
FROM Customer
),
SalesTotal
AS ( SELECT CustomerId ,
SUM(OrderTotal) AS AllOrderTotal
FROM SalesOrder
)
SELECT CustomerId ,
AllOrderTotal
FROM SalesTotal
WHERE AllOrderTotal > 10000.00 ;

--You need to determine
--if other queries that are using the Customer table will be blocked by this query. You
--also need to determine
--if this query will be blocked by other queries that are using the Customer table.

/*
What behavior should you expect?
A. The other queries will be blocked by this query.
The safer , easier way to help you pass any IT exams. 48 / 80
This query will be blocked by the other queries.
B. The other queries will be blocked by this query.
This query will not be blocked by the other queries.
C. The other queries will not be blocked by this query.
This query will be blocked by the other queries.
D. The other queries will not be blocked by this query.
This query will not be blocked by the other queries
*/

我也认为应该选择D,这种情况不会发生堵塞。
thq002lyq7 2012-03-07
  • 打赏
  • 举报
回复
啥字啊咋看不懂啊
勿勿 2012-03-07
  • 打赏
  • 举报
回复
跟cte公用表达式没关系吧
listhome 2012-03-01
  • 打赏
  • 举报
回复
没人理我阿
listhome 2012-03-01
  • 打赏
  • 举报
回复
我感觉和CTE没有关系,注意当年的事务级别是
SERIALIZABLE
geniuswjt 2012-03-01
  • 打赏
  • 举报
回复
就是共用表达式是否会引起阻塞么?
跟普通查询没啥大的区别吧,不会引起阻塞。
listhome 2012-03-01
  • 打赏
  • 举报
回复
有人理我吗

22,207

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧