Database Systems: Introduction to Databases and Data Warehouses by Nenad Jukic: Susan Vrbsky Svetlozar Nestorov & Susan Vrbsky & Svetlozar Nestorov
Author:Nenad Jukic: Susan Vrbsky,Svetlozar Nestorov & Susan Vrbsky & Svetlozar Nestorov
Language: eng
Format: epub
Publisher: Prospect Press
Published: 2017-11-15T00:00:00+00:00
FIGURE 6.17 An example of a binary search.
FIGURE 6.18 An example of an index.
Let us now observe how an index increases the search speed. In the example illustrated by Figure 6.16, we illustrated the search for the record whose CustName value is Steve. We showed that the linear search required nine steps. In Figure 6.19, we show the binary version of the same search, enabled by the CUSTNAME_INDEX table. Since the CustName column in the index table is sorted, we can apply a binary search when searching for a particular name. In this case, finding the index table record whose CustName is Steve took three steps. Once the index record with the CustName value Steve was located in the CUSTNAME_INDEX table, its pointer value pointing to the corresponding record in the CUSTOMER table is used to complete the search.
Let us now observe another example illustrating the performance improvement enabled by the use of an index. Let us assume that a user wants to find out how many customers named Pam exist in the relation CUSTOMER (note once again that relation CUSTOMER is not sorted by the CustName column).
First observe the case illustrated by Figure 6.20, which depicts how such a query would be executed on the relation CUSTOMER (shown in Figure 6.15), without the use of an index.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8309)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6817)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6792)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6679)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6466)
Driving Data Quality with Data Contracts by Andrew Jones(6412)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6168)
Learning SQL by Alan Beaulieu(6005)
Weapons of Math Destruction by Cathy O'Neil(5798)
Big Data Analysis with Python by Ivan Marin(5401)
Data Engineering with dbt by Roberto Zagni(4408)
Solidity Programming Essentials by Ritesh Modi(4055)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3915)
Pandas Cookbook by Theodore Petrou(3619)
Blockchain Basics by Daniel Drescher(3307)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2914)
Feature Store for Machine Learning by Jayanth Kumar M J(2821)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2803)
Mastering Python for Finance by Unknown(2748)
