SQL执行效率问题

44万数据测试

两个存储过程内容如下:
1、
select note from table where cityID='1'

2、
WITH temp AS
(
    SELECT * FROM city WHERE cityid=1
    UNION ALL
    SELECT city .* FROM city
    INNER JOIN temp ON city .professionParent=temp.cityid
)
SELECT table .note  FROM table
INNER JOIN temp ON table .cityid=temp.cityid

那个执行速度最快
posted on 2009-12-23 11:25  freexiaoyu  阅读(196)  评论(0编辑  收藏  举报