Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL - Index

 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • 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
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic