This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

indexes  RSS feed

 
anish jain
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain how does the index work in database?
 
Janeice DelVecchio
Bartender
Posts: 1812
12
Eclipse IDE Java Windows
  • 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
  • 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
  • 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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!