SELECT ID AS ID,
( SELECT MIN(B.STU_PRICE)
FROM STU_INFO AS B
WHERE C.CODE = B.CODE AND
B.STU_START_DATE > dateadd(day, 5,(SELECT getdate()))) AS PRICE_DISCOUNT,
CURRENCY AS CURRENCY,
LEFT(CLASS_STARDATE, LEN(CLASS_STARDATE) - 1) AS CLASS_STARDATE,CATEGORY AS CATEGORY
FROM
--INFO
(SELECT DISTINCT CODE,
(SELECT STU_CODE + ','
FROM STU_INFO-- TRAFFIC_INFO
WHERE CODE = A.CODE FOR XML PATH('')) AS CLASS_STARDATE
FROM STU_INFO A) B RIGHT JOIN
INFO C ON C.CODE = B.CODE
索引假脱机 性能耗去将近70% 求优化方略
能贴下执行计划吗?
好的
@觉信: 目前简单看了一下,是STU_INFO这个表的查询的问题,这个表有索引吗?
@觉信: 我看到一篇索引假脱机的文章,你看看
http://www.cnblogs.com/lyhabc/archive/2013/04/19/3029840.html
@飞来飞去: 有的 主键索引