|
-
WWALICE,
Indexing on NUMBER data type is faster than indexing on VARCHAR2 data type. Not only Oracle but also other RDBMSs search the index object (indexed on NUMBER datatype) faster than VARCHAR2 datatype. Remember if a sequence number is used on the indexed column, then the index is moving towards one side, and the search takes longer time to find appropriate key values. In the values are entered randomly, then the index on number data type is good.
If an index is created on the CHAR datatype column, then SQL statement must have its full value in the where clause in order to use the index, otherwise index will not be used. For ex, an index is created on NAME CHAR(20) , and you issue a statement like,
SELECT * from emp where name = 'SCOTT';
the index will not be used since query has less than 20 characters in the constant value.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|