设为首页 加入收藏

TOP

Oracle分区表的层次查询如何才能用到分区?(二)
2015-11-21 03:26:35 来源: 作者: 【 】 浏览:34
Tags:Oracle 分区表 层次 查询 如何 才能 用到 分区
-------------------------------- | 0 | SELECT STATEMENT | | 19 | 798 | 16 (7)| 00:00:01 | | | |* 1 | CONNECT BY NO FILTERING WITH START-WITH| | | | | | | | | 2 | PARTITION LIST ALL | | 19 | 285 | 15 (0)| 00:00:01 | 1 | 9 | | 3 | TABLE ACCESS FULL | TEST | 19 | 285 | 15 (0)| 00:00:01 | 1 | 9 | ---------------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 1 - access("T"."PARENT_ID"=PRIOR "T"."ID") filter("T"."ID"=12 AND "T"."CODE"='0306') 统计信息 ---------------------------------------------------------- 0 recursive calls 0 db block gets 55 consistent gets 0 physical reads 0 redo size 557 bytes sent via SQL*Net to client 360 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 2 sorts (memory) 0 sorts (disk) 2 rows processed SQL> select * from test t start with (t.id = 12 and t.code = '0306') connect by prior t.id = t.parent_id and prior t.code = '0306'; 执行计划 ---------------------------------------------------------- Plan hash value: 6144290 ---------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | ---------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 19 | 798 | 16 (7)| 00:00:01 | | | |* 1 | CONNECT BY NO FILTERING WITH START-WITH| | | | | | | | | 2 | PARTITION LIST ALL | | 19 | 285 | 15 (0)| 00:00:01 | 1 | 9 | | 3 | TABLE ACCESS FULL | TEST | 19 | 285 | 15 (0)| 00:00:01 | 1 | 9 | ---------------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 1 - access("T"."PARENT_ID"=PRIOR "T"."ID" AND PRIOR "T"."CODE"='0306') filter("T"."ID"=12 AND "T"."CODE"='0306') 统计信息 ---------------------------------------------------------- 0 recursive calls 0 db block gets 55 consistent gets 0 physical reads 0 redo size 557 bytes sent via SQL*Net to client 360 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 2 sorts (memory) 0 sorts (disk) 2 rows processed SQL> select * from test t start with t.id = 12 connect by prior t.id = t.parent_id and prior t.code = '0306'; 执行计划 ---------------------------------------------------------- Plan hash value: 6144290 ---------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | ---------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 19 | 798 | 16 (7)| 00:00:01 | | | |* 1 | CONNECT BY NO FILTERING WITH START-WITH| | | | | | | | | 2 | PARTITION LIST ALL | | 19 | 285 | 15 (0)| 00:00:01 | 1 | 9 | | 3 | TABLE ACCESS FULL | TEST | 19 | 285 | 15 (0)| 00:00:01 | 1 | 9 | ---------------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): ----------------------------------------------
首页 上一页 1 2 3 下一页 尾页 2/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇oracle 邮件发送 下一篇一张6亿条数据表引发的事故

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: