|
-
what is interesting in this example is the fact that table is FIXED width.
If sybase is able to utilize this fact then it is no surprise it is fast, for example:
lets have an index on (gender, zip) (not zip, gender!).
a B-tree index can then be represented as:
Level0: M(male), F(female), I(others...)
Level1: zipM1, ...,zipMn; zipF1, ...zipFn; zipI1, ...zipIn
(zips at level1 are sorted for M,F and I entries)
Now, since rows are fixed width, it is just a matter of a simple calculation to find number of rows falling in ranges of (zipMx and zipMy), (zipFx and zipFy) and (zipIx and zipIy).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|