World's most popular travel blog for travel bloggers.

[Answers] Approximate time for selection operation using index when equality is on nonkey

, , No Comments
Problem Detail: 

In database query processing, the approximate time for selection operation using primary index when equality is on key is $2(b_s + b_t)$ where $b_s$ is disk seek time and $b_t$ is disk transfer time (assuming one level of indexing), because one seek and transfer time will be needed for finding the index and another one will be for the actual data.

But what will happen if the equality is on a no- key value? Since now we cannot search in the index, don't we have to do a linear search?

Asked By : Saurabh

Answered By : Grisha Weintraub

In this case full table scan will be executed.

The cost is $N$ I/O operations (where $N$ is a number of pages/blocks in your table)

Best Answer from StackOverflow

Question Source :

3.2K people like this

 Download Related Notes/Documents


Post a Comment

Let us know your responses and feedback