2014年6月11日

cost和逻辑读

摘要: 逻辑读只考虑io,cost不仅要考虑io,还要考虑cpu,是综合的考虑,更准确一些 阅读全文

posted @ 2014-06-11 14:48 todayiwillgo 阅读(113) 评论(0) 推荐(0)

位图索引

摘要: 适合位图索引的地方:一位图索引列大量重复二该表极少更新 阅读全文

posted @ 2014-06-11 14:47 todayiwillgo 阅读(120) 评论(0) 推荐(0)

null

摘要: null不能与任何值进行比较,null不等于null,所以unique中可以出现多个null如果某个列有null值,那么就不能再该列上建立索引。因为索引列的列值是有序排放的。 阅读全文

posted @ 2014-06-11 09:32 todayiwillgo 阅读(83) 评论(0) 推荐(0)

greatest 和least

摘要: select greatest(1,3,4) from dual;select least(1,3,4) from dual;数字按大小排字符串从第一个一次往下比较。 阅读全文

posted @ 2014-06-11 09:24 todayiwillgo 阅读(158) 评论(0) 推荐(0)

exists的应用

摘要: select 1 from dual where exists(select 1 from dual);如果结果集不为空则返回true,结果集为空返回falseselect 1 from dual where not exists(select 1 from dual); 阅读全文

posted @ 2014-06-11 09:20 todayiwillgo 阅读(117) 评论(0) 推荐(0)

char和varchar类型的字段比较注意

摘要: char是固定字符长度varchar是变成如果有两个值进行比较(一个是varchar一个是char类型的)where rpad(c.count,20)=l.count --空格也是一个字符 阅读全文

posted @ 2014-06-11 09:16 todayiwillgo 阅读(243) 评论(0) 推荐(0)

case的两种写法

摘要: case 表达式 when case1 then value1,case 2 then value2,...else endcase 1 when 2 then 3 when 1 then 4 else 5 end如果要再这个基础上加条件的话,只能在他外面嵌套一个case了应为这个case的表达式已... 阅读全文

posted @ 2014-06-11 09:12 todayiwillgo 阅读(859) 评论(0) 推荐(0)

实时和准实时

摘要: 实时:在要求的时间内必须到达,否则数据无效,会对系统造成巨大的损失。准实时:在要求的时间内必须到达,否则数据无效,不会对系统造成巨大的损失。 阅读全文

posted @ 2014-06-11 09:05 todayiwillgo 阅读(6415) 评论(0) 推荐(0)

导航