上一页 1 ··· 162 163 164 165 166 167 168 169 170 ··· 177 下一页
摘要: 条件有rownum的时候出现扫描表,到前n行停止 阅读全文
posted @ 2014-02-25 21:37 czcb 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 技巧2:union 代替or的情况当SQL语句中,or 条件上面有一个为子查询,并且子查询上的表与源表不同,这个时候就可以用union代替or或者你发现执行计划中的 filter 有 or 并且 or 后面跟上子查询(EXISTS...)的时候就要注意,比如:2 - filter("T"."LRR_... 阅读全文
posted @ 2014-02-25 11:29 czcb 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 示例如下(请自己动手实验):create table test1 as select * from dba_objects;create table test2 as select * from dba_objects;create index idx1 on test1(object_id);cr... 阅读全文
posted @ 2014-02-25 11:16 czcb 阅读(271) 评论(0) 推荐(0) 编辑
摘要: SQL> create table t1(id1 char(2),id2 char(2),id3 char(2));Table created.SQL> desc t1 Name Null? Type ---------------------------------------... 阅读全文
posted @ 2014-02-22 21:57 czcb 阅读(237) 评论(0) 推荐(0) 编辑
摘要: SQL> set linesize 200SQL> set pagesize 200SQL> set autot traceSQL> select distinct department_name from hr.departments dept, hr.employees emp where ... 阅读全文
posted @ 2014-02-21 13:44 czcb 阅读(1374) 评论(0) 推荐(0) 编辑
摘要: SQL> create table t as select * from dba_objects; Table created. SQL> create index idx_t on t(object_id); Index created. SQL> BEGIN 2 ... 阅读全文
posted @ 2014-02-20 09:59 czcb 阅读(228) 评论(0) 推荐(0) 编辑
摘要: SQL> create table t as select * from dba_objects; Table created. SQL> create index idx_t on t(object_id); Index created. SQL> BEGIN 2 ... 阅读全文
posted @ 2014-02-19 22:09 czcb 阅读(267) 评论(0) 推荐(0) 编辑
摘要: SQL> show parameter pgaNAME TYPE VALUE------------------------------------ ----------- ------------------------------pga_aggregate_target big integer ... 阅读全文
posted @ 2014-02-19 15:11 czcb 阅读(1208) 评论(0) 推荐(0) 编辑
摘要: ipcs:-q Writes information about active message queues-o Writes the following usage information: * Number of messages on queue * Total number of bytes... 阅读全文
posted @ 2014-02-18 17:08 czcb 阅读(488) 评论(0) 推荐(0) 编辑
摘要: select ename,sal,sum(sal) over (partition by ename order by sal,empno) as running_totalfrom emp1order by 2按ename 汇总salover()开窗函数和聚合函数的不同之处是对于每个组返回多行,而... 阅读全文
posted @ 2014-02-18 16:22 czcb 阅读(2264) 评论(0) 推荐(1) 编辑
上一页 1 ··· 162 163 164 165 166 167 168 169 170 ··· 177 下一页