To speed up the search for records in a table with an equality predicate on a non key attribute A and selectivity factor fs, is preferable:
- A sequential organization on a key attribute ?
- A static hash organisation on a key attribute ?
- An inverted index on A
I have to justify the answer and give an estimate of query execution cost in all three cases.
To my mind it was
- log2⌈Npag(R)⌉ according to this :
? No info
it depends if it is a clustered or an unclustered index.
Professor answer :
- Npag(R) "because indexing is on the key" and "according to the screenshot" (which is provided above, but for me he is wrong on the cell as far as it isn't a memory operation but a equality search)
- Yeah, it depends ...
I don't understand why is he saying the first and where does he take the second. My teacher uses this book he co-writted.