Presentation is loading. Please wait.

Presentation is loading. Please wait.

15.6 Index-Based Algorithms Sadiya Hameed ID: 206 CS257.

Similar presentations


Presentation on theme: "15.6 Index-Based Algorithms Sadiya Hameed ID: 206 CS257."— Presentation transcript:

1 15.6 Index-Based Algorithms Sadiya Hameed ID: 206 CS257

2 Sadiya Hameed2 Clustering Indexes Clustering Indexes are indexes on an attribute or attributes such that all the tuples with a fixed value for the search key of this index appear on as few blocks as possible

3 Sadiya Hameed3 Index-Based Selection For clustering index on R.a: number of disk I/O’s will average B( R ) / V(R, a) Number may be higher cause Index not entirely in main memory Tuples spread over more blocks

4 Sadiya Hameed4 Index-Based Selection (cont’d) For non-clustering index on R.a: number of disk I/O’s will average T ( R ) / V(R, a) Number may be higher because May need to read some index blocks from disk Number could be lower because Some retrieved tuples appear on same block

5 Sadiya Hameed5 Joining by using an Index Natural Join R(X, Y) S(Y, Z) Number of disk I/O’s If R is clustered: B( R ) If R is not clustered: T( R )

6 Sadiya Hameed6 Joins using a Sorted Index Consider Natural Join R(X, Y) S(Y, Z) with Index on Y for either R or S zig-zag join If indexes are B-Tree and R and S are clustered Retrieval of tuples with given key has I/O’s proportional to the fractions of these two relations

7 Sadiya Hameed7 Questions


Download ppt "15.6 Index-Based Algorithms Sadiya Hameed ID: 206 CS257."

Similar presentations


Ads by Google