现在一个sql查询出来得要31秒,求问怎么提高效率,语句如下:
select e.emp_no,e.emp_cname,e.emp_ename,e.dept_code,b.[name], ISNULL(convert(nvarchar(20),EventsDateTime,120),'') cardtime
from [benq].Sky2004.dbo.AccessEvents a,employee e,[benq].Sky2004.dbo.VIEW_DeviceReader b where
a.deviceid=b.recnum and b.[name] like '%考勤%'
and a.personno=e.emp_no
and a.personno in(select c.emp_no from employee c where c.dept_code='2000' and c.active='Y')
AND (convert(nvarchar(20),EventsDateTime,112) BETWEEN '2012-08-01' AND '2012-08-21')
and e.active='Y'
order by convert(nvarchar(10),EventsDateTime,112) desc,e.emp_no,EventsDateTime
一只名叫tom的猫
白衣染霜花
幕布斯7119047
翻过高山走不出你
LEATH
手掌心
HUH函数
牛魔王的故事
相关分类