This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating Indexes on Number Columns

 
Deepika Saxena
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Sheriff
Posts: 35975
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!