• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

indexes

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please explain how does the index work in database?
 
Bartender
Posts: 1849
15
Eclipse IDE Spring VI Editor Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic