A mechanism for querying a label-aware index in the context of versioning
is provided. The key of the label-aware index is a composite key and
includes a unique label identifier, corresponding to a specific label,
and the key of the original index, which key itself may be a composite
key. The label-aware index may be implemented as an index-organized
table. The label-aware index is organized on disk first by the label
identifier and then by the original index key so that queries of versions
of resources within a particular label are as efficient as queries on an
index of an unversioned repository with the same number of resources.