aspose file tools*
The moose likes Oracle/OAS and the fly likes Creating Indexes on Number Columns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Creating Indexes on Number Columns" Watch "Creating Indexes on Number Columns" New topic
Author

Creating Indexes on Number Columns

Deepika Saxena
Ranch Hand

Joined: Jul 05, 2009
Posts: 59
Hi,
is there any performance overhead creating indexes on a table columns, whose data type is other than number or interger? i mean if we have a table Emp with the following structure and assume that eno, ename both will only accept unique values. in this case , what is the recommended way to create index? is it on eno or ename? i read that indexes on numbers will have better performance over the indexes, which are created on characters. could any body please explain the reason behind this.
Thanks.
--Deepika
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

Deepika,
The fastest index is the one that is used the most. Do you have more queries/joins by number or name? I would imagine number making it the best choice of an index.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
wood burning stoves
 
subject: Creating Indexes on Number Columns
 
Similar Threads
connecting to database through servlets
about servlets(very urgent)
fetch the records from cache
Connecting to database form servlets
delete option of cascade in Hibernate one-to-one association