tags:

views:

33

answers:

1

In the #~stream there is a 64-bit vector of sorted tables. But what makes a table sorted or not? The only thing that I can find in the official documentation is that 16 metadata tables must be sorted by either primary key or secondary key and lists them. Why even have a bit vector for this since this can determine by specification? And if that's the case, is this field then just a constant that is AND-mask with the preceeding Valid bit-vector?

Thanks in advance!

A: 

It doesn't say. The only thing that makes sense to me is that it indicates that the table corresponding with a bit in the vector is in fact sorted. Chapter 22 only says "certain tables are required to be sorted", leaving enough room to allow other tables, perhaps added in the future, to be optionally sorted.

Hans Passant