摘要:
原文地址:http://www.cnblogs.com/kivenhou/archive/2010/10/06/1844856.html具体要注意的:1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num上设置默认值0,确保表中num列没有null值,然后这样查询:select id from t where num=02.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描。优化器将无法通过索引来确定将要命 阅读全文
摘要:
declare @tmpTbl Table(uid int)declare @userid intbegin begin TRAN LUOFUXIAN INSERT INTO @tmpTbl(uid) SELECT userid FROM tbl_news declare tmpCursor CURSOR FOR SELECT uid FROM @tmpTbl OPEN tmpCursor FETCH NEXT FROM tmpCursor into @userid while @@FETCH_... 阅读全文
摘要:
在9i上执行的操作 查询test表中记录select * from test;删除test表中记录delete from test;获得过去的会话exec dbms_flashback.disable;查询出3分钟前这个test表的情况select * from test as of timesta 阅读全文
摘要:
1、记录到XML变量declare @cxml xmlset @cxml=(select * from zd_storeP for XML RAW('store'),ROOT('stores'))select @cxml2、XML到记录集方法一:用OPENXML 90000条记录速度测试,22s,16s,16sdeclare @cxml xml,@nxml intset @cxml=(select * from zd_storeP for XML RAW('store'),ROOT('stores')) --大概1sselect 阅读全文
摘要:
原文标题:浅谈.NET下的多线程和并行计算(八)Winform多线程编程基础上链接:http://www.cnblogs.com/lovecindywang/archive/2010/01/06/1640267.html首先我们创建一个Winform的应用程序,在上面添加一个多行文本框和一个按钮控件,按钮的事件如下:Thread.Sleep(1000);StringBuilder sb = new StringBuilder();for (int i = 0; i < 10000; i++) sb.Append("test");string s = sb.ToStri 阅读全文
摘要:
在9i上执行的操作查询test表中记录select * from test;删除test表中记录delete from test;获得过去的会话exec dbms_flashback.disable;查询出3分钟前这个test表的情况select * from test as of timestamp(systimestamp - interval '3' minute );将查出的记录插入到误删除数据的表中insert into test select * from test as of timestamp(systimestamp - interval '30 阅读全文
摘要:
Nicholas为您讲解如何提升JavaScript操作DOM的效率!在Web开发中,JavaScript的一个很重要的作用就是对DOM进行操作,可 你知道么?对DOM的操作是非常昂贵的,因为这会导致浏览器执行回流操作,而执行了过多的回流操作,你就会发现自己的网站变得越来越慢了,我们应该尽可能 的减少DOM操作。本文是这个系列的最后一篇,给出了一些指导性原则,比如在什么时候应该对DOM可以进行什么样的操作等。【原文】Nicholas C. Zakas-Speed up your JavaScript, Part 4【译文】明达在过去的几周中,我为大家介绍了几种可以加快JavaScript脚本运 阅读全文
摘要:
原文:http://www.cnblogs.com/wangyuanxun/archive/2011/06/10/2077429.html使用线程互斥变量. 通过定义互斥变量来判断是否已运行实例.C#实现如下:把program.cs文件里的Main()函数改为如下代码:static void Main(){bool runone;System.Threading.Mutex run = new System.Threading.Mutex(true, "jiaao_test", out runone);if (runone){run.ReleaseMutex();Appli 阅读全文
摘要:
1、记录到XML变量declare @cxml xmlset @cxml=(select * from zd_storeP for XML RAW('store'),ROOT('stores'))select @cxml2、XML到记录集方法一:用OPENXML 90000条记录速度测试,22s,16s,16sdeclare @cxml xml,@nxml intset @cxml=(select * from zd_storeP for XML RAW('store'),ROOT('stores')) --大概1sselect 阅读全文
摘要:
原文地址:http://www.cnblogs.com/kivenhou/archive/2010/10/06/1844856.html具体要注意的: 1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 可以在num上设置默认值0,确保表中num列没有null值,然后这样查询: select id from t where num=0 2.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描。优化器将无法通过索引来 阅读全文
摘要:
接下来我们说说“涵盖索引”和include索引。所谓的涵盖索引,就是传统方式在多个列上创建的索引。“inlude索引”是SQL2k5提供的新功能,允许添加非键列到非聚集索引的叶节点上。创建涵盖索引:create index ix_tb_col1_col2 on tb( col1, col2)创建include索引:create index ix_tb_col1 on tb( col1)include(col2, col3,col4) 涵盖索引和include索引的区别在于,涵盖索引的所有列都是键列,索引行的物理存储顺序就是col1、col2的顺序,这也是误区6之所以称为误区的原因。涵盖索引可以 阅读全文
摘要:
原文地址:http://www.cnblogs.com/kivenhou/archive/2010/10/06/1844856.html具体要注意的: 1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 可以在num上设置默认值0,确保表中num列没有null值,然后这样查询: select id from t where num=0 2.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描。优化器将无法通过索引来 阅读全文