摘要: 用代码来重构这个世界 阅读全文
posted @ 2013-03-11 22:14 毒角兽 阅读(128) 评论(0) 推荐(0)
摘要: 有两个简单例子,以说明 “exists”和“in”的效率问题1) select * from T1 where exists(select 1 from T2 where T1.a=T2.a) ;T1数据量小而T2数据量非常大时,T1<<T2 时,1) 的查询效率高。2) select * from T1 where T1.a in (select T2.a from T2) ;T1数据量非常大而T2数据量小时,T1>>T2 时,2) 的查询效率高。exists 用法:请注意 1)句中的有颜色字体的部分 ,理解其含义;其中 “select 1 from T2 where 阅读全文
posted @ 2013-03-03 13:51 毒角兽 阅读(183) 评论(0) 推荐(0)
摘要: eclipse连接数据库时出现了这样的异常:java.sql.SQLException: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orcl并且对于Oracle sql developer 不能正常连接数据库如图:解决办法:查找数据库中 阅读全文
posted @ 2013-02-11 18:46 毒角兽 阅读(1359) 评论(0) 推荐(0)