WEB开发网
开发学院数据库Oracle Oracle索引管理 阅读

Oracle索引管理

 2009-06-23 11:50:26 来源:WEB开发网   
核心提示: 3.查询时,索引字段含有=NULL SQL> select * from t where i='';no rows selectedExecution Plan--Plan hash value: 1322348184---| Id | Operation | Nam

3.查询时,索引字段含有=NULL SQL> select * from t where i='';
no rows selected
Execution Plan
----------------------------------------------------------
Plan hash value: 1322348184
 
-----------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |     1 |    25 |     0   (0)|          |
|*  1 | FILTER     |      |       |       |            |          |
|   2 | TABLE ACCESS FULL| T    |     2 |    50 |     7   (0)| 00:00:01 |

4.查询时,索引字段使用了函数

先更改一条数据

update t set i='A' where v=10;
SQL> select * from t;
 
I                   V
---------- ------------
A                  10
2                  20

查询

SQL> select * from t where i='A';
 ---------------------------------------------------------------------
| Id  | Operation          | Name   | Rows  | Bytes | Cost (%CPU)| Time    
-----------------------------------------------------------------------
|   0 | SELECT STATEMENT   |     |     1 |    25 |     2   (0)| 00:00:01 |
|   1 | TABLE ACCESS BY INDEX ROWID| T   |  1 |   25 |     2   (0)| 00:00:01 |
|*  2 | INDEX RANGE SCAN    | TI_IND |   1 |     |     1   (0)| 00:00:01 |
----------------------------------------------------------------------

上一页  1 2 3 4 5  下一页

Tags:Oracle 索引 管理

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接