龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 数据库类 > Oracle 技术 >

Oracle 分区索引介绍和实例演示(6)

时间:2014-09-17 11:43来源:网络整理 作者:网络 点击:
分享到:
--以下为范围查询,Pstart为1,Pstop为2,同样支持分区消除 SQL select * from big_table 2 where created_date=to_date('20120625','yyyymmdd') and created_date=to_date('20130625','yyyymmd

--以下为范围查询,Pstart为1,Pstop为2,同样支持分区消除
SQL> select * from big_table                                                              
  2  where created_date>=to_date('20120625','yyyymmdd') and created_date<=to_date('20130625','yyyymmdd');

Execution Plan
----------------------------------------------------------
Plan hash value: 213633793

------------------------------------------------------------------------------------------------------
| Id  | Operation                | Name      | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT         |           |  3334 |   133K|    14   (0)| 00:00:01 |       |       |
|   1 |  PARTITION RANGE ITERATOR|           |  3334 |   133K|    14   (0)| 00:00:01 |     1 |     2 |
|*  2 |   TABLE ACCESS FULL      | BIG_TABLE |  3334 |   133K|    14   (0)| 00:00:01 |     1 |     2 |
------------------------------------------------------------------------------------------------------

精彩图集

赞助商链接