File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

indexes

 
anish jain
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain how does the index work in database?
 
Janeice DelVecchio
Saloon Keeper
Posts: 1800
12
Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The index in a database works in the same way an index would work in a book. It's a way for the DB to retrieve data faster.

In Oracle you can make your own indexes for columns you use a lot, but some are made automatically for columns with Primary Key constraints or Unique constraints.
 
anish jain
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Janeice DelVecchio wrote:The index in a database works in the same way an index would work in a book. It's a way for the DB to retrieve data faster.

In Oracle you can make your own indexes for columns you use a lot, but some are made automatically for columns with Primary Key constraints or Unique constraints.


Can you please elaborate? I want to know how does that work when someone fires a select query?
 
Tom Reilly
Rancher
Posts: 618
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please elaborate? I want to know how does that work when someone fires a select query?


Every database implementation is different. Here's a link that explains how Oracle database does it: http://www.dba-oracle.com/art_9i_indexing.htm
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic