??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品久久久久久久久久三级 ,91美女视频在线,国产精品爱久久久久久久http://www.aygfsteel.com/kebo/往事随?.....前事如梦...... zh-cnSat, 17 May 2025 20:40:09 GMTSat, 17 May 2025 20:40:09 GMT60一个sql写法http://www.aygfsteel.com/kebo/archive/2009/01/05/249993.htmlkebokeboMon, 05 Jan 2009 13:55:00 GMThttp://www.aygfsteel.com/kebo/archive/2009/01/05/249993.htmlhttp://www.aygfsteel.com/kebo/comments/249993.htmlhttp://www.aygfsteel.com/kebo/archive/2009/01/05/249993.html#Feedback4http://www.aygfsteel.com/kebo/comments/commentRss/249993.htmlhttp://www.aygfsteel.com/kebo/services/trackbacks/249993.html有h问这Lsql该怎么实现Q?br />表数据和l构
    CODE NAME    B01    S01    B02    S02
    1          张三       数学    80  
    1          张三                            语文    75
    2          王五       数学    70  
    2          王五    
    3          李四       数学    50  
    3          李四                           语文    88

希望查询出如下结果:
    CODE SUM_STR(NAME)    B01    SUM_STR(S01)    B02    SUM_STR(S02)
    1                张三                    数学                80           语文            75
    2                王五                    数学                70  
    3                李四                    数学                50           语文             88
q个问题可以采用自定义的聚集函数来实玎ͼ

create   or   replace  type strcat_type  as  object (
    cat_string 
varchar2 ( 4000 ),
    static 
function  ODCIAggregateInitialize(cs_ctx  In  Out strcat_type)  return   number ,
    member 
function  ODCIAggregateIterate(self  In  Out strcat_type,value  in   varchar2 return  

number ,
    member 
function  ODCIAggregateMerge(self  In  Out strcat_type,ctx2  In  Out strcat_type) 

return   number ,
    member 
function  ODCIAggregateTerminate(self  In  Out strcat_type,returnValue Out 

varchar2 ,flags  in   number return   number
)
/


------------------------------------

create   or   replace  type body strcat_type  is
  static 
function  ODCIAggregateInitialize(cs_ctx  IN  OUT strcat_type)  return   number
  
is
  
begin
      cs_ctx :
=  strcat_type(  null  );
      
return  ODCIConst.Success;
  
end ;

  member 
function  ODCIAggregateIterate(self  IN  OUT strcat_type,
                                       value 
IN   varchar2  )
  
return   number
  
is
  
begin
      
if  self.cat_string  is   null   then
         self.cat_string :
=  value;
      
end   if ;
      
return  ODCIConst.Success;
  
end ;

  member 
function  ODCIAggregateTerminate(self  IN  Out strcat_type,
                                         returnValue OUT 
varchar2 ,
                                         flags 
IN   number )
  
return   number
  
is
  
begin
      returnValue :
=  self.cat_string;
      
return  ODCIConst.Success;
  
end ;

  member 
function  ODCIAggregateMerge(self  IN  OUT strcat_type,
                                     ctx2 
IN  Out strcat_type)
  
return   number
  
is
  
begin
       if self.cat_string is null then
                   self.cat_string :=  ctx2.cat_string;
          end if;
       return  ODCIConst.Success;
  
end ;

end ;
/

-------------------

CREATE   OR   REPLACE   FUNCTION  sum_str(input  varchar2  )
RETURN   varchar2
PARALLEL_ENABLE AGGREGATE USING strcat_type;
/

-------最后查询语句:

select  code,sum_str(name), sum_str(b01) b01,sum_str(s01) ,sum_str(b02) b02,sum_str(s02)
from  javaeye  group   by  code  order   by  code


kebo 2009-01-05 21:55 发表评论
]]>
openlayers如何利用vector和style作出markerhttp://www.aygfsteel.com/kebo/archive/2008/09/04/226919.htmlkebokeboThu, 04 Sep 2008 06:12:00 GMThttp://www.aygfsteel.com/kebo/archive/2008/09/04/226919.htmlhttp://www.aygfsteel.com/kebo/comments/226919.htmlhttp://www.aygfsteel.com/kebo/archive/2008/09/04/226919.html#Feedback1http://www.aygfsteel.com/kebo/comments/commentRss/226919.htmlhttp://www.aygfsteel.com/kebo/services/trackbacks/226919.html 定义标注的样式,q个军_标注昄的方式,必须定义?br /> 1 $package("com.bct.map");
 2 com.bct.map.EncoderMarkerStyle = {
 3     'bigEncoder':{
 4         graphicWidth:24,
 5         graphicHeight : 24,
 6         graphicXOffset : -12,
 7         graphicYOffset : -24,
 8         externalGraphic : "scripts/map/img/channel2.png"
 9     },
10     'smallEncoder':{
11         graphicWidth:16,
12         graphicHeight : 16,
13         graphicXOffset : -8,
14         graphicYOffset : -16,
15         externalGraphic : "scripts/map/img/channel.gif"
16     },
17     'selectStyle':{
18         pointerEvents: "visiblePainted",
19         border:"border:25 outset #ff88ff",
20         cursor: "pointer",
21         graphicWidth:24,
22         graphicHeight : 24,
23         graphicXOffset : -12,
24         graphicYOffset : -24,
25         externalGraphic : "scripts/map/img/channel2.png"    
26     },
27     styleMap: new OpenLayers.StyleMap({
28                     "select"new OpenLayers.Style({pointRadius: 24})
29     })
30 }

marker层,扩展vector层,通过point和style辑ֈmarker的效?br />
  1 $package("com.bct.map");
  2 $import("com.bct.map.EncoderMarkerStyle");
  3 com.bct.map.MarkerVectorLayer = OpenLayers.Class(OpenLayers.Layer.Vector,{
  4     /**
  5      * parameters
  6      * attribute filer对象
  7      */
  8     getFeatureByAttribute :function(attributes){
  9         var feature = null;
 10         for(var i=0;i<this.features.length; ++i){
 11             var attri = this.features[i].attributes;
 12             var find = false;
 13             for(var j in attributes){
 14                 if(attributes[j] == attri[j]){
 15                     find = true;
 16                 }
 17             }
 18             if(find){
 19                 return this.features[i]; 
 20             }            
 21         }
 22     
 23     },
 24     addEncorderFeature:function(encNode,location){
 25         if(encNode&&this.repetitiveCheck(encNode.id)){
 26             return;
 27         }
 28         var attributes = OpenLayers.Util.extend({}, encNode.attributes);
 29         var enc_point = new OpenLayers.Geometry.Point(location.lon,location.lat);
 30         var enc_Feature = new OpenLayers.Feature.Vector(enc_point,attributes,com.bct.map.EncoderMarkerStyle['smallEncoder']);
 31         this
.addFeatures([enc_Feature]);
 32         if(encNode.attributes['lon']&&encNode.attributes['lat']&&encNode.attributes['lon'].length>0){
 33             return;
 34         }
 35         this.updateChannel(encNode.id,location.lon,location.lat);
 36     },
 37     addDeptFeature:function(deptNode,location){
 38         if(deptNode&&this.repetitiveCheck(deptNode.id)){
 39             return;
 40         }
 41         var attributes = OpenLayers.Util.extend({}, deptNode.attributes);
 42         var enc_point = new OpenLayers.Geometry.Point(location.lon,location.lat);
 43         var enc_Feature = new OpenLayers.Feature.Vector(enc_point,attributes,com.bct.map.EncoderMarkerStyle['smallEncoder']);
 44         
 45         this.addFeatures([enc_Feature]);
 46         
 47     },
 48     repetitiveCheck:function(entity_id){
 49         if(this.getFeatureByAttribute({id:entity_id})){
 50             return true;
 51         }
 52         return false;
 53     },
 54     updateChannel:function(channel_id,lon,lat){
 55         Ext.Ajax.request({
 56                url: 'deviceVideoEncoder.do?method=updateLonlat&id='+channel_id+"&lon="+lon+"&lat="+lat
 57         });
 58     },
 59     channelMarkerClick:function() {
 60         var features = this.selectedFeatures;
 61         if(features.length >=0&&features[0]) {
 62             feature = features[0];            
 63             var treeNodeAttribute = feature.attributes;
 64             var vedioPopForm = new Ext.FormPanel({
 65                                    frame:true,
 66                                 labelAlign: 'top',
 67                                 bodyStyle:'padding:5px',
 68                                 width: 400,
 69                                 height:200,
 70                                 layout: 'fit',
 71                                 items:[{
 72                                             xtype:'fieldset',
 73                                             title: '摄像头信?,
 74                                             autoHeight:true,
 75                                             autoWidth:true,
 76                                             html:"<p><font color='red' size='2'>名称:"+treeNodeAttribute['text']
 77                                             +"</font></p><p><font color='red' size='2'>通道?"+treeNodeAttribute['channelNumber']
 78                                             +"</font></p><p><font color='red' size='2'>讑֤名称:"+treeNodeAttribute['deviceunitName']
 79                                             +"</font></p><p><font color='red' size='2'>所属部?"+treeNodeAttribute['deptName']
 80                                             +"</font></p><p><font color='red' size='2'>l纬?"+treeNodeAttribute['lon']+","+treeNodeAttribute['lat']
 81                                     }]
 82             });
 83             var win = new Ext.Window({
 84                 width : 420,
 85                 height: 220,
 86                 items : vedioPopForm
 87             });
 88             win.show();            
 89         }
 90     },
 91     cartoonFeature :function(feature){
 92         this.drawFeature(feature,com.bct.map.EncoderMarkerStyle['bigEncoder']);
 93         var runner = new Ext.util.TaskRunner(1000);
 94         var task = {
 95             run:this.drawFeature,
 96             scope:this,
 97             args:[feature,com.bct.map.EncoderMarkerStyle['smallEncoder']],
 98             interval: 1000
 99         }
100         runner.start(task);
101     },
102     removeSelectFeature:function(){
103         var features = this.selectedFeatures;
104         for(var i=features.length-1; i>=0; i--) {
105             feature = features[i];
106             this.updateChannel(feature.attributes['id'],"","");
107         }
108         this.destroyFeatures(this.selectedFeatures);
109     },
110     monitorSelectFeature:function(){        
111         var features = this.selectedFeatures;
112         if(features.length >=0&&features[0]) {
113             feature = features[0];            
114             var treeNodeAttribute = feature.attributes;
115             var objId="mapAVShow"+treeNodeAttribute['id'];
116             var win = new Ext.Window({
117                 width : 420,
118                 height: 420,
119                 html:"<div id='mapEncoder' width='100%' height='100%'><object width='100%' height='100%' id='"+objId+"' classid='clsid:574B47E8-A366-4AB9-B2EA-57F145CA3780'></object></div>"
120             });            
121             win.show();
122             Ext.lib.Ajax.request('GET','channel.do?method=getSiteId&accept=json&id='+treeNodeAttribute['id'],
123                               {success: function(o){
124                                         var encoderObj;
125                                         encoderObj=Ext.util.JSON.decode(o.responseText);
126                                         $import("com.bct.monitor.mapAVShow");
127                                         var avshowObj=document.getElementById(objId);
128                                         var avshow=new com.bct.monitor.mapAVShow(avshowObj,
129                                         encoderObj[0].siteId,encoderObj[0].enCoderId,encoderObj[0].diveceUnitTypeId,'');
130                                         avshow.startVideo();
131                                         win.on("destroy",function del(){
132                                                          avshow.stopVideo();
133                                         });
134                                 }
135                               });             
136         }
137     }
138 });




kebo 2008-09-04 14:12 发表评论
]]>
一ơsql调优历程http://www.aygfsteel.com/kebo/archive/2007/09/10/144078.htmlkebokeboMon, 10 Sep 2007 11:35:00 GMThttp://www.aygfsteel.com/kebo/archive/2007/09/10/144078.htmlhttp://www.aygfsteel.com/kebo/comments/144078.htmlhttp://www.aygfsteel.com/kebo/archive/2007/09/10/144078.html#Feedback0http://www.aygfsteel.com/kebo/comments/commentRss/144078.htmlhttp://www.aygfsteel.com/kebo/services/trackbacks/144078.html在项目进入性能试阶段Q终于爆发了sqlq行~慢Q系l吞吐量下降Q甚至一度出现oracle服务器cpu100%的情c具体开发和试人员报告情况Q开始介入处理?br />
具体查找性能~慢的过E略除?br />发现一条sqlq行~慢。通过跟踪发现一下信?br />select alias_p2.pendingid, alias_p2.workitemid, alias_p2.operationid, alias_p2.operationkey,

  2  alias_p2.title, alias_p2.sendercn, alias_p2.operatedes, alias_p2.pendingstate,

  3  alias_p2.parameter, alias_p2.createdate, alias_p2.deptname, alias_p2.completeddate ,

  4  alias_p2.openstate , alias_p2.name, alias_p2.processinstanceid, alias_p2.asset

  5   from ( select alias_p1.pendingid, alias_p1.workitemid, alias_p1.operationid,

  6   alias_p1.operationkey, alias_p1.title, alias_p1.sendercn, alias_p1.operatedes,

  7    alias_p1.pendingstate, alias_p1.parameter, alias_p1.createdate, alias_p1.deptname,

  8      alias_p1.completeddate , alias_p1.openstate , alias_p1.name, alias_p1.processinstanceid ,

  9        alias_p1.asset , rownum rn from(select alias_p.pendingid, alias_p.workitemid, alias_p.operationid,

 10        alias_p.operationkey, alias_p.title, alias_p.sendercn, alias_p.operatedes, alias_p.pendingstate,

 11        alias_p.parameter, alias_p.createdate, alias_p.deptname, alias_p.completeddate , alias_p.openstate ,

 12         pd.name, w.processinstanceid , eam_db.concatassetname( alias_p.operationkey, alias_p.operationid )

 13          asset from WF_Pending alias_p, WF_WorkItem w, WF_ProcessDefinition pd, WF_ProcessInstance pi

 14          where alias_p.ownerid='qinxue'   and alias_p.pendingstate in(0,3,5,7,9,10,11,12)

 15            and (alias_p.deptname=' 审控部信息处 ' or alias_p.deptname='' or alias_p.deptname is null)

 16            and w.workitemid = alias_p.workitemid   and pi.processinstanceid = w.processinstanceid

 17  and pi.completeddate is null   and pd.processdefinitionid = w.processdefinitionid  order by alias_p.createdate desc) alias_p1 where rownum <=10)

alias_p2 where rn>=1;

 

已选择 10 行?/span>

 

 

执行计划

----------------------------------------------------------

   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=10 Card=1 Bytes=2507

          )

 

   1    0   VIEW (Cost=10 Card=1 Bytes=2507)

   2    1     COUNT (STOPKEY)

   3    2       VIEW (Cost=10 Card=1 Bytes=2494)

   4    3         SORT (ORDER BY STOPKEY) (Cost=10 Card=1 Bytes=167)

   5    4           NESTED LOOPS (Cost=8 Card=1 Bytes=167)

   6    5             NESTED LOOPS (Cost=7 Card=1 Bytes=162)

   7    6               NESTED LOOPS (Cost=6 Card=1 Bytes=134)

   8    7                 TABLE ACCESS (FULL) OF 'WF_PENDING' (Cost=5

          Card=1 Bytes=111)

 

   9    7                 TABLE ACCESS (BY INDEX ROWID) OF 'WF_WORKITE

          M' (Cost=1 Card=3 Bytes=69)

 

  10    9                   INDEX (UNIQUE SCAN) OF 'SYS_C003694' (UNIQ

          UE)

 

  11    6               TABLE ACCESS (BY INDEX ROWID) OF 'WF_PROCESSDE

          FINITION' (Cost=1 Card=1 Bytes=28)

 

  12   11                 INDEX (UNIQUE SCAN) OF 'SYS_C003684' (UNIQUE

          )

 

  13    5             TABLE ACCESS (BY INDEX ROWID) OF 'WF_PROCESSINST

          ANCE' (Cost=1 Card=1 Bytes=5)

 

  14   13               INDEX (UNIQUE SCAN) OF 'SYS_C003662' (UNIQUE)

 

 

 

 

l计信息

----------------------------------------------------------

        314  recursive calls

          0  db block gets

      29433  consistent gets

          0  physical reads

          0  redo size

       2153  bytes sent via SQL*Net to client

        372  bytes received via SQL*Net from client

          2  SQL*Net roundtrips to/from client

        101  sorts (memory)

          0  sorts (disk)

         10  rows processed

其中一致读辑ֈq?万次Q关联调用出?14ơ。排序数g非常多,昄W一目标是把q两个数据降下来?br />通过q一步的分析。发现出现这些问题的主要原因是调?font size="3">eam_db.concatassetname( alias_p.operationkey, alias_p.operationid )q个包?br />开始考虑直接在sql外层做关联,不用function来实现。利用聚集函数来合ƈ数据?br />着手徏立:

聚集函数Q CREATE OR REPLACE FUNCTION F_ASSETLINK(P_STR VARCHAR2) RETURN VARCHAR2
AGGREGATE USING asset_link;


----------------------
创徏typeQCREATE OR REPLACE TYPE ASSET_LINK AS OBJECT (
STR VARCHAR2(30000),
STATIC FUNCTION ODCIAGGREGATEINITIALIZE(SCTX IN OUT ASSET_LINK) RETURN NUMBER,
MEMBER FUNCTION ODCIAGGREGATEITERATE(SELF IN OUT ASSET_LINK, VALUE IN VARCHAR2) RETURN NUMBER,
MEMBER FUNCTION ODCIAGGREGATETERMINATE(SELF IN ASSET_LINK, RETURNVALUE OUT VARCHAR2, FLAGS IN NUMBER) RETURN NUMBER,
MEMBER FUNCTION ODCIAGGREGATEMERGE(SELF IN OUT ASSET_LINK, CTX2 IN ASSET_LINK) RETURN NUMBER
)
------------------------------------------------------

创徏type bodyQCREATE OR REPLACE TYPE BODY ASSET_LINK IS
STATIC FUNCTION ODCIAGGREGATEINITIALIZE(SCTX IN OUT ASSET_LINK) RETURN NUMBER IS
BEGIN
SCTX := ASSET_LINK(NULL);
RETURN ODCICONST.SUCCESS;
END;
MEMBER FUNCTION ODCIAGGREGATEITERATE(SELF IN OUT ASSET_LINK, VALUE IN VARCHAR2) RETURN NUMBER IS
BEGIN
SELF.STR := SELF.STR ||','|| VALUE;
RETURN ODCICONST.SUCCESS;
END;
MEMBER FUNCTION ODCIAGGREGATETERMINATE(SELF IN ASSET_LINK, RETURNVALUE OUT VARCHAR2, FLAGS IN NUMBER) RETURN NUMBER IS
BEGIN
RETURNVALUE := SELF.STR;
RETURN ODCICONST.SUCCESS;
END;
MEMBER FUNCTION ODCIAGGREGATEMERGE(SELF IN OUT ASSET_LINK, CTX2 IN ASSET_LINK) RETURN NUMBER IS
BEGIN
NULL;
RETURN ODCICONST.SUCCESS;
END;
END;
调整sql如下Q?br />select alias_p.pendingid, alias_p.workitemid, alias_p.operationid,
   alias_p.operationkey, alias_p.title, alias_p.sendercn, alias_p.operatedes, alias_p.pendingstate,
   alias_p.parameter, alias_p.createdate, alias_p.deptname, alias_p.completeddate , alias_p.openstate ,
   pd.name, w.processinstanceid
   --,T.ASSETCLASS3  ASSET  
   ,f_assetlink(d3.typename) ASSET
   --,eam_db.concatassetname( alias_p.operationkey, alias_p.operationid )  asset
   from WF_Pending alias_p, WF_WorkItem w,
   WF_ProcessDefinition pd, WF_ProcessInstance pi
   , tb_asset_dizhiyihao T,dic_app_wfconfig wfc,dic_app_assettype3 d3
   where alias_p.ownerid='qinxue'  
   and alias_p.pendingstate in(0,3,5,7,9,10,11,12)
   and (alias_p.deptname='审控部信息处' or alias_p.deptname='' or alias_p.deptname is null)
   and w.workitemid = alias_p.workitemid  
   and pi.processinstanceid = w.processinstanceid
   and pi.completeddate is null  
   and pd.processdefinitionid = w.processdefinitionid
   AND    t.pk_businessid = alias_p.operationid
          and alias_p.operationkey = wfc.memo_1
          and wfc.wfconfig_code = t.wfconfig_code
   and t.assetclass3 = d3.assettype3_id
   group by alias_p.pendingid, alias_p.workitemid, alias_p.operationid,
   alias_p.operationkey, alias_p.title, alias_p.sendercn, alias_p.operatedes, alias_p.pendingstate,
   alias_p.parameter, alias_p.createdate, alias_p.deptname, alias_p.completeddate , alias_p.openstate ,
   pd.name, w.processinstanceid
   order by alias_p.createdate desc
得到l计数据如下Q?br />C:\Documents and Settings\ibm>sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 9?10 19:27:33 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn jic/jic@name
已连接?br />SQL> set autotrace traceonly
SQL> select alias_p.pendingid, alias_p.workitemid, alias_p.operationid,
  2     alias_p.operationkey, alias_p.title, alias_p.sendercn, alias_p.operatedes, alias_p.pendingstate,
  3     alias_p.parameter, alias_p.createdate, alias_p.deptname, alias_p.completeddate , alias_p.openstate ,
  4     pd.name, w.processinstanceid
  5     --,T.ASSETCLASS3  ASSET
  6     ,f_assetlink(d3.typename) ASSET
  7     --,eam_db.concatassetname( alias_p.operationkey, alias_p.operationid )  asset
  8     from WF_Pending alias_p, WF_WorkItem w,
  9     WF_ProcessDefinition pd, WF_ProcessInstance pi
 10     , tb_asset_dizhiyihao T,dic_app_wfconfig wfc,dic_app_assettype3 d3
 11     where alias_p.ownerid='qinxue'
 12     and alias_p.pendingstate in(0,3,5,7,9,10,11,12)
 13     and (alias_p.deptname='审控部信息处' or alias_p.deptname='' or alias_p.deptname is null)
 14     and w.workitemid = alias_p.workitemid
 15     and pi.processinstanceid = w.processinstanceid
 16     and pi.completeddate is null
 17     and pd.processdefinitionid = w.processdefinitionid
 18     AND    t.pk_businessid = alias_p.operationid
 19            and alias_p.operationkey = wfc.memo_1
 20            and wfc.wfconfig_code = t.wfconfig_code
 21     and t.assetclass3 = d3.assettype3_id
 22     group by alias_p.pendingid, alias_p.workitemid, alias_p.operationid,
 23     alias_p.operationkey, alias_p.title, alias_p.sendercn, alias_p.operatedes, alias_p.pendingstate,
 24     alias_p.parameter, alias_p.createdate, alias_p.deptname, alias_p.completeddate , alias_p.openstate ,
 25     pd.name, w.processinstanceid
 26     order by alias_p.createdate desc;

已选择30行?/p>


执行计划
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=19 Card=1 Bytes=205)
   1    0   SORT (GROUP BY) (Cost=19 Card=1 Bytes=205)
   2    1     NESTED LOOPS (Cost=17 Card=1 Bytes=205)
   3    2       HASH JOIN (Cost=16 Card=1 Bytes=191)
   4    3         HASH JOIN (Cost=11 Card=1 Bytes=183)
   5    4           NESTED LOOPS (Cost=8 Card=1 Bytes=167)
   6    5             NESTED LOOPS (Cost=7 Card=1 Bytes=139)
   7    6               NESTED LOOPS (Cost=6 Card=1 Bytes=134)
   8    7                 TABLE ACCESS (FULL) OF 'WF_PENDING' (Cost=5
          Card=1 Bytes=111)

   9    7                 TABLE ACCESS (BY INDEX ROWID) OF 'WF_WORKITE
          M' (Cost=1 Card=1 Bytes=23)

  10    9                   INDEX (UNIQUE SCAN) OF 'SYS_C004347' (UNIQ
          UE)

  11    6               TABLE ACCESS (BY INDEX ROWID) OF 'WF_PROCESSIN
          STANCE' (Cost=1 Card=1 Bytes=5)

  12   11                 INDEX (UNIQUE SCAN) OF 'SYS_C004334' (UNIQUE
          )

  13    5             TABLE ACCESS (BY INDEX ROWID) OF 'WF_PROCESSDEFI
          NITION' (Cost=1 Card=1 Bytes=28)

  14   13               INDEX (UNIQUE SCAN) OF 'SYS_C004329' (UNIQUE)
  15    4           TABLE ACCESS (FULL) OF 'DIC_APP_WFCONFIG' (Cost=2
          Card=24 Bytes=384)

  16    3         TABLE ACCESS (FULL) OF 'TB_ASSET_DIZHIYIHAO' (Cost=4
           Card=310 Bytes=2480)

  17    2       TABLE ACCESS (BY INDEX ROWID) OF 'DIC_APP_ASSETTYPE3'
          (Cost=1 Card=1 Bytes=14)

  18   17         INDEX (UNIQUE SCAN) OF 'PK_DIC_APP_ASSETTYPE3' (UNIQ
          UE)

 

 

l计信息
----------------------------------------------------------
          6  recursive calls
          0  db block gets
        847  consistent gets
          0  physical reads
          0  redo size
       4102  bytes sent via SQL*Net to client
        383  bytes received via SQL*Net from client
          3  SQL*Net roundtrips to/from client
          1  sorts (memory)
          0  sorts (disk)

其中排序?01变ؓ1?br />一致读降ؓ847。下降非常客?br />兌调用仅有6ơ?br />此sql性能优化非常可观。至此优化结束:)



kebo 2007-09-10 19:35 发表评论
]]>
利用mv做跨http://www.aygfsteel.com/kebo/archive/2007/08/14/136693.htmlkebokeboTue, 14 Aug 2007 07:32:00 GMThttp://www.aygfsteel.com/kebo/archive/2007/08/14/136693.htmlhttp://www.aygfsteel.com/kebo/comments/136693.htmlhttp://www.aygfsteel.com/kebo/archive/2007/08/14/136693.html#Feedback0http://www.aygfsteel.com/kebo/comments/commentRss/136693.htmlhttp://www.aygfsteel.com/kebo/services/trackbacks/136693.htmlZ保持最新数据和快速切换就不可以利用exp/imp的方式,利用data guard则有q_的问题?br />在这U情况下Q可以利用on prebuilt table选项创徏mv。然后同步运行一D|间。一ơ切换,删除
mvQ这U情况下可以保持同名的表。mv删除。达到数据同步,切换的目标?br />

kebo 2007-08-14 15:32 发表评论
]]>
分析函数一?/title><link>http://www.aygfsteel.com/kebo/archive/2007/07/17/130889.html</link><dc:creator>kebo</dc:creator><author>kebo</author><pubDate>Tue, 17 Jul 2007 08:55:00 GMT</pubDate><guid>http://www.aygfsteel.com/kebo/archive/2007/07/17/130889.html</guid><wfw:comment>http://www.aygfsteel.com/kebo/comments/130889.html</wfw:comment><comments>http://www.aygfsteel.com/kebo/archive/2007/07/17/130889.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/kebo/comments/commentRss/130889.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/kebo/services/trackbacks/130889.html</trackback:ping><description><![CDATA[select z.a,z.b,z.c from (select lag(t.a,2)over(order by t.a) pp_val, lag(t.a,1)over(order by t.a) p_val, t.a, lead(t.a,1)over(order by t.a) n_val, lead(t.a,2)over(order by t.a) nn_val, t.b,t.c from test2 t) z where z.a = '1' and ((z.p_val = '1' and z.pp_val = '1') or (z.p_val = '1' and z.n_val = '1') or (z.n_val = '1' and z.nn_val = '1'));<img src ="http://www.aygfsteel.com/kebo/aggbug/130889.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/kebo/" target="_blank">kebo</a> 2007-07-17 16:55 <a href="http://www.aygfsteel.com/kebo/archive/2007/07/17/130889.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>夜读tom感悟http://www.aygfsteel.com/kebo/archive/2007/07/11/129475.htmlkebokeboTue, 10 Jul 2007 16:15:00 GMThttp://www.aygfsteel.com/kebo/archive/2007/07/11/129475.htmlhttp://www.aygfsteel.com/kebo/comments/129475.htmlhttp://www.aygfsteel.com/kebo/archive/2007/07/11/129475.html#Feedback0http://www.aygfsteel.com/kebo/comments/commentRss/129475.htmlhttp://www.aygfsteel.com/kebo/services/trackbacks/129475.html

kebo 2007-07-11 00:15 发表评论
]]>
lighttped(window)+scgi+rails配置方式http://www.aygfsteel.com/kebo/archive/2007/01/02/91447.htmlkebokeboTue, 02 Jan 2007 13:08:00 GMThttp://www.aygfsteel.com/kebo/archive/2007/01/02/91447.htmlhttp://www.aygfsteel.com/kebo/comments/91447.htmlhttp://www.aygfsteel.com/kebo/archive/2007/01/02/91447.html#Feedback0http://www.aygfsteel.com/kebo/comments/commentRss/91447.htmlhttp://www.aygfsteel.com/kebo/services/trackbacks/91447.html配置:server.modules 
server.modules              = (
                                "mod_rewrite",
                                "mod_redirect",
                                "mod_access",
                                "mod_status",
                                "mod_scgi",
                                "mod_accesslog" )
配置
index-file.names            = ( "index.php", "index.html",
                                            "index.htm", "default.htm" )
#### accesslog module
accesslog.filename          = "c:/depot/log/access.log"
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi",".scgi" )       标红的需要加?br />
## bind to port (default: 80)
server.port                = 8080------------------讉K端口,我设|?080

## error-handler for status 404
server.error-handler-404   = "/dispatch.scgi"
-----------------------------------------------
scgi.server = ("dispatch.scgi" => ((
"host" => "127.0.0.1",
"port" => 9999,
"check-local" => "disable"
)) )

scgi.debug=3

status.status-url = "/server-status"
status.config-url = "/server-config"

-------------------------------------
## server.virtual-* options
server.document-root        = "c:/depot/public"
记得q个需要设|到public目录,不然按默认的rails生成的文档一些东西访问不来的
-----------------------------------------------------------------------------------------------------
需要注意的是你开发的E序需要放在c盘下,不然找不到config/scgi.yamlq个文g
然后lighttpd必须装在c盘下(当前版本?.4.11)



kebo 2007-01-02 21:08 发表评论
]]>
sqlplus执行@sql.sql的错?/title><link>http://www.aygfsteel.com/kebo/archive/2006/12/27/90390.html</link><dc:creator>kebo</dc:creator><author>kebo</author><pubDate>Wed, 27 Dec 2006 14:24:00 GMT</pubDate><guid>http://www.aygfsteel.com/kebo/archive/2006/12/27/90390.html</guid><wfw:comment>http://www.aygfsteel.com/kebo/comments/90390.html</wfw:comment><comments>http://www.aygfsteel.com/kebo/archive/2006/12/27/90390.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/kebo/comments/commentRss/90390.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/kebo/services/trackbacks/90390.html</trackback:ping><description><![CDATA[今天l数据库执行@spcreate.sql老是? <br />SP2-0734:unknown command beginning "spcreate.s..." - rest of line ignored. <br />郁闷坏了。经q一番折腑֎来是 <br />solution Description:<br /> ===================== <br />You need to enter a valid SQL*Plus command. <br />In this case, you cannot start svrmgrl from within SQL*Plus, <br />you have to start svrmgrl from the command prompt. <br />This error will also occur when trying to execute a <br /><font color="#ff0000"><b>the @ symbol is mapped to the key 'Kill'</b></font> from the user's keyboard. <br />The way to find out the current keyboard mapping in a unix environment is using the command 'stty -a'. <br />The way to correct problem is to map 'Kill' to some other keyboard symbol. <br />The command example would be '<b><font color="#ff0000">stty kill ^U</font></b>'. <br />Having remapped the key you would then log into SQL*Plus and execute script.<br /> -------------------------------U念一?br />如果出现I报错的话 记得执行: <br />SET SQLBLANKLINES ON<img src ="http://www.aygfsteel.com/kebo/aggbug/90390.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/kebo/" target="_blank">kebo</a> 2006-12-27 22:24 <a href="http://www.aygfsteel.com/kebo/archive/2006/12/27/90390.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>常看帖子的好处,特别是高手掐架的帖子http://www.aygfsteel.com/kebo/archive/2006/11/01/78391.htmlkebokeboTue, 31 Oct 2006 20:11:00 GMThttp://www.aygfsteel.com/kebo/archive/2006/11/01/78391.htmlhttp://www.aygfsteel.com/kebo/comments/78391.htmlhttp://www.aygfsteel.com/kebo/archive/2006/11/01/78391.html#Feedback0http://www.aygfsteel.com/kebo/comments/commentRss/78391.htmlhttp://www.aygfsteel.com/kebo/services/trackbacks/78391.html

kebo 2006-11-01 04:11 发表评论
]]>
听oracle讲感受http://www.aygfsteel.com/kebo/archive/2006/10/03/73244.htmlkebokeboMon, 02 Oct 2006 17:43:00 GMThttp://www.aygfsteel.com/kebo/archive/2006/10/03/73244.htmlhttp://www.aygfsteel.com/kebo/comments/73244.htmlhttp://www.aygfsteel.com/kebo/archive/2006/10/03/73244.html#Feedback0http://www.aygfsteel.com/kebo/comments/commentRss/73244.htmlhttp://www.aygfsteel.com/kebo/services/trackbacks/73244.html  今天听了下oracle讲,一个感受,以后不敢操作数据库了Q发现对大多数数据库命o产生的后果和影响都不是很清楚。想起以前切换双?br />
的时候也出现eygle说的问题Q然来真的对数据库基知识预备不啊。感觉以前真是可以称为“虎胆”哦。难怪老幕以前佩服我!Q!卡卡卡?br />
恩,感觉oracle入门现在都够不上Q不敢再l别决问?)免得惹笑话。梳理了一下,估计也就对sql,集合的理解熟悉点Q有Ҏ我哦。低

调,低调......学习学习......


kebo 2006-10-03 01:43 发表评论
]]>
վ֩ģ壺 ͨ| | ʤ| | ũ| | | | Ϸ| | | | | | ɽ| | | | | Ӣ| | ͼľ| | ǧ| ƽ| ɽ| ʯ| | Ѱ| | ֦| ˳| | ʻ| Ԫ| Ϻ| | | ī| | ػ|