All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
数据库死锁导致网站站点访问不了之解决方案_[SQL,Server教程]
经典SQL语句大全_mssql学习_编程技术
用php实现广告轮播_php资料_编程技术
使用,PHP,快速生成,Flash,动画_php资料_编程技术
Sql,server,2005数据库中的DDL触发器_[SQL,Server教程]
ASP.NET中基类页的设计和使用_[Asp.Net教程]
[delphi语法1]Object Pascal语言编写环境
ASP.NET模拟其他用户进行关机_.net资料_编程技术
浅淡PHP生成HTML的思路_[PHP教程]
总结SQL Server与Access语法小差异_[SQL Server教程]
Reading number is top 10 pictures
China's first snake village1
牛奶和人奶哪个好?
India's national beauty of the college students
乳娘帕梅拉安德森2
No trading, no killing
青春清纯美女大集合2
原子弹轰炸长崎的珍贵照片
10 powerless things in life
So beauty, will let you spray blood10
Play for Free show breast in a world of ice and snow
Download software ranking
C#程序员参考手册
功夫熊猫2(上集)
Such love down(擒爱记)
Tram sex maniac 2 (H) rar bag9
Tram sex maniac 2 (H) rar bag18
Boxer's Top ten classic battle10
圣殿祭司的ASP.NET.2.0.开发详解-使用C#
Unix video tutorial19
SQL2000 For 4IN1
Unix video tutorial2
归海一刀 published in(发表于) 2014/2/3 6:42:56 Edit(编辑)
加快Sql server时间查询速度的办法_[SQL Server教程]

加快Sql server时间查询速度的办法_[SQL Server教程]

加快Sql server时间查询速度的办法_[SQL Server教程]

数据量大的情况下Sql server时间比较查询的速度是比较慢的,如果access中进行时间的比较,sql语句很简单,select * from table where thetime>#\"& now() &\"#这样即可。
但在mssql就不能这样,要用datediff语句和getdate()函数进行比较。
如select count(*) from table where datediff(s,getdate(),thetime)>0,我自己特别做了个50万条数据的的表,执行这条语句差不多需要1200毫秒。
后来研究了一下,发现其实不需要用datediff函数,可以直接使用>来比较,语句如下:select count(*) from table where thetime>getdate(),这样差不多只要750毫秒,快了将近500毫秒,实验结果此方法值得使用。




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.