function base index
2014-04-03 19:48
405 查看
create table t1(id number, idd varchar2(10)); insert into t1 values( 1, '11'); insert into t1 values(2, '22'); commit; SQL> create index idx_idd_t1 on t1(to_number(idd)); Index created. SQL> select * from t1 where idd='11'; ID IDD ---------- ---------- 1 11 Execution Plan ---------------------------------------------------------- Plan hash value: 3617692013 -------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 20 | 2 (0)| 00:00:01 | |* 1 | TABLE ACCESS FULL| T1 | 1 | 20 | 2 (0)| 00:00:01 | -------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 1 - filter("IDD"='11') Note ----- - dynamic sampling used for this statement (level=2) SQL> select * from t1 where to_number(idd)=11; ID IDD ---------- ---------- 1 11 Execution Plan ---------------------------------------------------------- Plan hash value: 1463967975 ------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 33 | 2 (0)| 00:00:01 | | 1 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 33 | 2 (0)| 00:00:01 | |* 2 | INDEX RANGE SCAN | IDX_IDD_T1 | 1 | | 1 (0)| 00:00:01 | ------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 2 - access(TO_NUMBER("IDD")=11) Note ----- - dynamic sampling used for this statement (level=2) SQL> select * from t1 where to_number(idd)=to_number('11'); ID IDD ---------- ---------- 1 11 Execution Plan ---------------------------------------------------------- Plan hash value: 1463967975 ------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 33 | 2 (0)| 00:00:01 | | 1 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 33 | 2 (0)| 00:00:01 | |* 2 | INDEX RANGE SCAN | IDX_IDD_T1 | 1 | | 1 (0)| 00:00:01 | ------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 2 - access(TO_NUMBER("IDD")=11) Note ----- - dynamic sampling used for this statement (level=2) SQL> select * from t1 where to_number(idd)=to_number('11'); ID IDD ---------- ---------- 1 11 Execution Plan ---------------------------------------------------------- Plan hash value: 1463967975 ------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 33 | 2 (0)| 00:00:01 | | 1 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 33 | 2 (0)| 00:00:01 | |* 2 | INDEX RANGE SCAN | IDX_IDD_T1 | 1 | | 1 (0)| 00:00:01 | ------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 2 - access(TO_NUMBER("IDD")=11) Note ----- - dynamic sampling used for this statement (level=2)
相关文章推荐
- java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-base
- pip安装python包出现Cannot fetch index base URL http://pypi.python.org/simple/
- python学习手册笔记--第16~19章--function_base
- $.each(json,function(index,item){ }); jquery遍历
- attempt to index local 'self' (a function value)
- Lua 标准库 - 基本函数(base function)
- Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(F:/Windows/TEMP/) is not within the
- 汇编错误:must be index or base register
- jquery $.each(box,function(attr,value){}) 与 $().each(function(index,element){})
- An internal error occurred during: "Building UI model". com/google/common/base/Function
- Django CBV(Class-Base View) vs FBV(Function-Base View)
- Java版本的Selenium运行时出现错误(java.lang.NoClassDefFoundError: com/google/common/base/Function)
- error C2660: 'Gdiplus::GdiplusBase::operator new' : function does not take 3 parameters
- SharePoint 2010 PowerShell base function abut list
- atom-miku插件安装报错“url.indexOf is not a function”
- Fatal error: Call to a member function fetch_array() on a non-object in E:\wamp\www\shop\index.php
- 关于Uncaught TypeError: type is not a function at HTMLAnchorElement.onclick (indexjsp:71)的解决
- swift 调用 oc [cannot find interface declaration for ‘ BaseViewModel’ , superclass of ‘indexViewModel’
- BaseAdapter java.lang.ArrayIndexOutOfBoundsException: length=2; index=2 dispatchTouchEvent
- Lua 标准库 - 基本函数(base function)