This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL - Index

 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding "Index" in SQL, I searched on the Internet and understood the theoretical part that it is like searching in a library, that instead of searching the whole library for a specific book, by indexing, we can search for the book by its first letter (i.e; Books that begin with the letter "A"), which in this case makes the search much faster.

But, I didn't understand the technical point here.

Say I create an index like this:



What is the preceding line trying to tell me? Maybe the answer will be that I want to search by "coindex", but what is really confusing me is that WHEN will I use indexing. I'm not making any search, so, WHERE can I feel "index" in my SQL command.

Thank you very much.

 
James Ward
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


In the above SQL, we are searching on coindex column. If an index exists on that column it will be used automatically by database to search, thereby giving us quick results.
 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Ward wrote:

In the above SQL, we are searching on coindex column. If an index exists on that column it will be used automatically by database to search, thereby giving us quick results.


Oh, I see, that makes sense.

Thank you so much.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic