码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
命令与文件的查询 where locate find
命令与文件查询:where,whereis,locate,findwhere:命令查找whereis,locate:非实时查找工具;依赖于实现构建的索引,索引的构建是在系统较为空闲时自动进行(周期性任务),手动更新此数据库(updatedb)查找速度快,模糊查找find:文件查找,实时查找;查找速度略慢;精..
分类:其他好文   时间:2015-09-07 07:12:59    阅读次数:220
SQL大量数据查询的优化 及 非用like不可时的处理方案
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num...
分类:数据库   时间:2015-09-07 00:25:53    阅读次数:298
[LeetCode]Search Insert Position
Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if ...
分类:其他好文   时间:2015-09-06 20:06:42    阅读次数:155
MySQL时间转换/字符串截取/
字符串截取: SELECT?SUBSTRING(‘abcdefg‘,2,5) 计算字符长度: len(string) --查询2010前入学入学ID select?user?from?cf_log?where?substr(user,0,4)<2010?order?by?user?ASC?limit?0,10; 统计元组数...
分类:数据库   时间:2015-09-06 18:41:53    阅读次数:297
jdbc操作clob大数据
Connection?conn?=?this.getHibernateTemplate() .getSessionFactory().getCurrentSession().connection(); String?sqlclob?=?"Select?o.value_clob?from?os_propertyset?o?Where?o.prope...
分类:数据库   时间:2015-09-06 18:41:23    阅读次数:277
pat1002. A+B for Polynomials (25)
1002. A+B for Polynomials (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time, you are supposed to find A+B where A and B are two ...
分类:其他好文   时间:2015-09-06 18:20:29    阅读次数:142
oracle exists
公司项目中有用到exists,感觉挺有用的,拷贝一些感念的东西。“exists”和“in”的效率问题1) select * from T1 where exists(select 1 from T2 where T1.a=T2.a) ;T1数据量小而T2数据量非常大时,T1>T2 时,2) 的查.....
分类:数据库   时间:2015-09-06 17:35:59    阅读次数:223
根据日期进行表分区
一 使用SpagoBI和Hive进行互联网统计分区问题? 1 原来根据年月日进行分区再拼接SQL时会异常复杂,需要在Where条件后判断是否跨年,跨月,跨日等问题。 2 Hive的自定义函数不能再Where条件后返回字符串条件来进行...
分类:其他好文   时间:2015-09-06 13:12:04    阅读次数:590
局部变量传参数
局部变量传参数:保障安全 把原来我要拼接字符串的地方换成一个@符号 例: cmd.CommandText="select*from Test where Code=@code";cmd.Parameters.AddWithValue("参数名字",值);try 传参数 { 可以在这里面写 }catc...
分类:其他好文   时间:2015-09-06 12:40:34    阅读次数:166
inner join on 和 where = 的区别!
请看下面两条语句:select * from table1 inner join table2 on table1.id = table2.idselect * from table1,table2 where table1.id = table2.id其实这两种方式的执行结果一样,具体区别如下:1...
分类:其他好文   时间:2015-09-06 09:46:55    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!