·日记首页 | [流水日记] | [生活印象] | [网事如风] | [美文共赏] | [天下经典] | [资料文档] | ::淋雨的猫:: 
 August , 2008
SuMoTuWeThFrSa
12
3456789
10111213141516
17181920212223
24252627282930
31
3 MONTH 4  3 YEAR 4

Information
共有日志:387
共有评论:181
注册观员:67
访问次数:
排序方式:

New Comment
1. 我又来苏州啦,看到速回
2. 苏州吴中区,在替小日本打工,在过去,可是要被拉...
3. 又看了一遍,原版,两个多小时的享受。
4. 彻底删除netmetting:%SystemR...
5. 宝宝你在哪边啊?
more...

Search

  
搜索评论:
  

列表关闭

Welcome!! 登陆
ID: PW:

共有387篇日志 | 每页显示5篇 | 第1页 [共78页] 
  1 [2] [3] [4] [5] [6] [7] [8] [9] [10] [>]-[>>]
 《通缉令》  [2008-7-29]
  心情指数#3
[阅读] 
By [raincat] in [[天下经典]] Time [22:05:49] | Comment[0] | 16 views
 
 《世界末日》  [2008-7-27]
  心情指数#3
[阅读] 
By [raincat] in [[天下经典]] Time [17:38:23] | Comment[0] | 15 views
 
 《时空线索》  [2008-7-26]
  心情指数#3
[阅读] 
By [raincat] in [[天下经典]] Time [22:16:04] | Comment[0] | 15 views
 
 装数据库的时候发现  [2008-7-24]
  心情指数#3
[阅读] 
By [raincat] in [[流水日记]] Time [12:35:48] | Comment[1] | 47 views
 
 tip of sql  [2008-7-16]
  心情指数#3
[阅读] 
优化前:
select a.*,b.user_count from (select * from base_material where (material_source='1' or (material_source='2' and companyid={companyid}) or (material_source='3' and departmentid={departmentid})) and type_code not like '09%' {p:sql_condition}) a,base_material_usr_frequency b 
where a.material_code = b.material_code and b.userid={userid} 
union all (select base_material.*,0 as user_count from base_material where (material_source='1' or (material_source='2' and companyid={companyid}) or (material_source='3' and departmentid={departmentid})) and material_code not in(select material_code from base_material_usr_frequency where userid={userid}) and type_code not like '09%' {p:sql_condition})
order by user_count desc

优化后:
select t_material.*, nvl(t_frequency.user_count, 0) count 
By [raincat] in [[资料文档]] Time [12:18:37] | Comment[0] | 42 views
 
  1 [2] [3] [4] [5] [6] [7] [8] [9] [10] [>]-[>>]
Links:
 © 2003 DCShooter.com All Right Reserved.  Program by DLog & Poorfish 312.500 ms