通过下面语句可以查看某查询语句查询数据所话费的时间 在select查询语句前加: declare @d datetime set @d=getdate() 并在selec查询t语句后加: select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())