07 2013 档案
Oracle查询慢, 特别是更新慢问题
摘要:近期, 客户发现查询比较慢, 特别是更新更慢. 原来是oracle listerner log太大导致. (C:\app\Administrator\diag\tnslsnr\ServerName\listener\trace\listener.log) 阅读全文
posted @ 2013-07-29 09:00 思静 阅读(894) 评论(0) 推荐(0) 编辑
注意事项: Oracle Not Exists 及 Not In 使用
摘要:select value from temp_a awhere a.id between 1 and 100and not exists(select * from temp_b b where a.value=b.value);这时能查出结果select value from temp_a awhere a.id between 1 and 100and a.valuenot in(select valuefrom temp_b);此时查出的结果为空.经过google终于找出原因: 内表(temp_b)有空值. 用not in得到的结果集都为空.以下是结论:1、对于not exists查询, 阅读全文
posted @ 2013-07-13 23:13 思静 阅读(4022) 评论(0) 推荐(0) 编辑
Mysql 创建联合索引注意事项
摘要:当一个表有多条索引可走时, Mysql 根据查询语句的成本来选择走哪条索引, 联合索引的话, 它往往计算的是第一个字段(最左边那个), 这样往往会走错索引. 如: 索引Index_1(Create_Time, Category_ID), Index_2(Category_ID) 如果每天的数据都特别多, 而且有很多category, 但具体每个category的记录不会... 阅读全文
posted @ 2013-07-12 14:27 思静 阅读(16261) 评论(3) 推荐(0) 编辑
Merge Into For Update Example
摘要:Merge Into article aa Using ( SELECT md5_id, Min(article_id) as Min_Article_ID from article WHERE created_time between (sysdate-10/(24*60)) and sysdate and Min_Article_ID is null ... 阅读全文
posted @ 2013-07-03 15:37 思静 阅读(285) 评论(0) 推荐(0) 编辑


点击右上角即可分享
微信分享提示