As in Sql server we try to keep data type of a primary key as integer bcoz its indexing is fast, so wut abt in oracle?
Bcoz mostly in oracle people try to use varchar2. is there no effect on indexing?
which Data Type?
-
- Posts: 9
- Joined: Tue Sep 19, 2006 5:16 am
- Location: India
Hi,
In Oracle, Numbers are stored in a packed decimal like format, which are character strings; Indexing on VARCHAR or NUMERIC would be the same effect.
Even in oracle we can create indexing on numeric data type also like
CREATE INDEX emp_indx ON emp(empno) COMPUTE STATISTICS;
Here the index is created on empno which will be numeric in type.
if it is varchar2 then the index can automatically allocate maximum space it has; if it is in numeric like integer it would take only fixed space for indexing .
HTH,
Sudhakar
In Oracle, Numbers are stored in a packed decimal like format, which are character strings; Indexing on VARCHAR or NUMERIC would be the same effect.
Even in oracle we can create indexing on numeric data type also like
CREATE INDEX emp_indx ON emp(empno) COMPUTE STATISTICS;
Here the index is created on empno which will be numeric in type.
if it is varchar2 then the index can automatically allocate maximum space it has; if it is in numeric like integer it would take only fixed space for indexing .
HTH,
Sudhakar
Who is online
Users browsing this forum: No registered users and 3 guests