您的位置:首页 > 数据库

SQL执行效率问题

2009-12-23 11:25 239 查看
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

那个执行速度最快
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: