用户名:   自动登录 找回密码
密   码:    * 注册




发表新帖 回复这个主题  [ 3 篇帖子 ] 
作者 内容
 文章标题 : 分区表带partition参数和where性能比较
帖子发表于 : 2012-03-31 8:58 
离线
头像

注册: 2011-05-01 9:15
帖子: 120
不知道是个别现象,还是就是这样,结果还不敢确认
SQL> select * from awen.awen_date where birth<to_date('19900101','yyyymmdd');


执行计划
----------------------------------------------------------
Plan hash value: 2794993436

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

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

| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
| Pstart| Pstop |

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

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

| 0 | SELECT STATEMENT | | 2 | 44 | 9 (0)| 00:00:

01 | | |

| 1 | PARTITION RANGE SINGLE| | 2 | 44 | 9 (0)| 00:00:

01 | 1 | 1 |

| 2 | TABLE ACCESS FULL | AWEN_DATE | 2 | 44 | 9 (0)| 00:00:

01 | 1 | 1 |

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

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


Note
-----
- dynamic sampling used for this statement


统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
8 consistent gets
6 physical reads
0 redo size
512 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
2 rows processed

SQL> alter system flush buffer_cache;

系统已更改。

SQL> select * from awen.awen_date partition(part_1);


执行计划
----------------------------------------------------------
Plan hash value: 2794993436

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

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

| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
| Pstart| Pstop |

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

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

| 0 | SELECT STATEMENT | | 2 | 44 | 9 (0)| 00:00:

01 | | |

| 1 | PARTITION RANGE SINGLE| | 2 | 44 | 9 (0)| 00:00:

01 | 1 | 1 |

| 2 | TABLE ACCESS FULL | AWEN_DATE | 2 | 44 | 9 (0)| 00:00:

01 | 1 | 1 |

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

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


Note
-----
- dynamic sampling used for this statement


统计信息
----------------------------------------------------------
5 recursive calls
0 db block gets
16 consistent gets
6 physical reads
0 redo size
512 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
2 rows processed

加partition后 出现了recursive calls 且consistent gets也要多


页首
 用户资料  
 
 文章标题 : Re: 分区表带partition参数和where性能比较
帖子发表于 : 2014-02-18 9:27 
离线
头像

注册: 2014-02-18 9:22
帖子: 1
目前我在做数据库优化,也有此疑问,应该怎么用,请高人指点!


页首
 用户资料  
 
 文章标题 : Re: 分区表带partition参数和where性能比较
帖子发表于 : 2018-06-06 13:00 
离线
头像

注册: 2018-06-06 12:18
帖子: 1
我也想知道这个问题。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 3 篇帖子 ] 


在线用户

注册用户: 没有注册用户


查找:
前往 :  
cron
Powered by OraSql © 2011, 2012, oracle_awen