1. A computer-implemented system for scanning a plurality of data records to locate one or more data records that fulfill a query, comprising: a MOLAP multidimensional database stored in a computer-readable storage medium and containing a plurality of data records, wherein a data record includes a plurality of dimensions, a dimension further having a dimensional hierarchy, the dimensional hierarchy further having a plurality of elements; a dimensional hierarchy vector stored in the computer-readable storage medium and corresponding to structural characteristics of the dimensional hierarchy, the dimensional hierarchy vector describing a structural relationship indicating where an element appears in the dimensional hierarchy with respect to other elements within the dimensional hierarchy; a first index vector stored in the computer-readable storage medium and comprising a key assigned to each element in the dimensional hierarchy, the first index vector being an index to the dimensional hierarchy vector, the keys in the first index vector being associated with the dimensional hierarchy vector in order to perform a search based on a received query, wherein a logical expression is formulated based upon the query and the dimensional hierarchy vector; a second index vector generated using the logical expression and the keys assigned to the elements in the dimensional hierarchy, the second index vector being used to scan the plurality of data records in the MOLAP multidimensional database in O(N) time in order to locate one or more data records that fulfill the query.