首页 新闻 会员 周边

只查出一条记录,但是查询非常慢,不知道为什么?

0
[待解决问题]

select printouttime from nhis2.[dbo].[DtDNAReport]
where RegistrationId='906815C7-44C7-E211-8BA0-00E04C7727C6'  and  PrintOut is not null

注:printout是varbinary(max)类型

 

但是我用临时表就很快:

select printouttime,printout into #a from nhis2.[dbo].[DtDNAReport] where  RegistrationId='906815C7-44C7-E211-8BA0-00E04C7727C6'

select * from #a where PrintOut is not null

 

不明白是为什么??请高手指点迷津。

问题补充:

该表只有1万多数据,printout是filestream字段

珠儿的主页 珠儿 | 初学一级 | 园豆:4
提问于:2013-05-29 10:40
< >
分享
所有回答(2)
0

看一下查询计划,瓶颈是哪个地方,索引估计没有使用好

2012 | 园豆:21230 (高人七级) | 2013-05-29 12:33
0

是的。索引的问题

+小马哥++ | 园豆:906 (小虾三级) | 2013-05-29 16:41
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册