• 全部
  • 基础类
  • 应用实例
  • 新技术前沿

查询语名速度慢,请各位高手指教!

cb400sf 2004-02-27 11:41:02
如下的语名:select
u_v_basicinfo.archivesnum as u_v_basicinfo#archivesnum,
u_v_basicinfo.name as u_v_basicinfo#name,
u_v_RPRDepend.RPR_id as u_v_RPRDepend#RPR_id,
u_v_RPRDepend.RPR_status as u_v_RPRDepend#RPR_status
from u_v_basicinfo
left join u_v_archivestransfer
on u_v_basicinfo.archivesnum = u_v_archivestransfer.archivesnum
left join u_v_conscriptioninfo on u_v_basicinfo.archivesnum = u_v_conscriptioninfo.archivesnum
left join u_v_employcheckin on u_v_basicinfo.archivesnum = u_v_employcheckin.archivesnum
left join u_v_endowmentinsurance on u_v_basicinfo.archivesnum = u_v_endowmentinsurance.archivesnum
left join u_v_graduatesignup on u_v_basicinfo.archivesnum = u_v_graduatesignup.archivesnum
left join u_v_proxycontract on u_v_basicinfo.archivesnum = u_v_proxycontract.archivesnum
left join u_v_RPRDepend on u_v_basicinfo.archivesnum = u_v_RPRDepend.archivesnum
left join u_v_titleassess on u_v_basicinfo.archivesnum = u_v_titleassess.archivesnum

数据库中有5-6k条记录.上面的"u_v_"开头的是视图.

上面的语句执行时,只要花几秒钟的时间,可是当加上如下的条件后(RPR_status为bit型):
where u_v_RPRDepend.RPR_status = '1',执行却花了2分多钟,不知道是何原因
...全文
19 点赞 收藏 8
写回复
8 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复

还没有回复,快来抢沙发~

相关推荐
发帖
MS-SQL Server
创建于2007-09-28

3.3w+

社区成员

MS-SQL Server相关内容讨论专区
申请成为版主
帖子事件
创建了帖子
2004-02-27 11:41
社区公告
暂无公告