This is an old revision of the document!


Administration: Indexing Strategies

Indexing Concepts

Indexing Basics

Someone once told a story:

One day, a homeowner noticed that his kitchen sink we leaking. He fiddled with the faucet and concluded that the washer needed replacing. He headed down to the hardware store, purchased the replacement washer and returned home to install it. As soon as he tried to put the new washer in, he realized that it was the wrong size, so he headed back to the hardware store. After getting the correct washer, he returned, only to find that he once again had purchased the wrong washer. In his frustration, he removed the whole faucet and brought it into the hardware store. Once there, he was able to match it up correctly. He returned home, reinstalled the faucet, and finally was able to call the job finished.

This story tells us something about indexing. Hardware stores are like big databases. When we go to the hardware store to find a washer, we have the benefit of being able to go to the aisle containing washers. How did we know do that? Well, obviously, we looked at the signs or asked the clerk where the washer aisle was. This is like using a primary index to narrow a database. For example, a query may begin with a search against the STATE column. If we can reduce millions of rows down to just those in a particular STATE, we've greatly reduced the amount of data to examine.

But what if there is more criteria than just STATE. What if there is also a CITY. Once we get to the washer aisle in the hardware store, we know to look for faucet washers. That is

Additional Resources

See also:

 
Back to top
admin/indexing/concepts/basics.1295030024.txt.gz ยท Last modified: 2012/10/26 14:52 (external edit)