1. A computer-implemented method for analyzing data records in a MOLAP multidimensional database, comprising: identifying, sing one or more processors, one or more data records in the MOLAP multidimensional database, wherein a data record includes a plurality of dimensions, and wherein a dimension includes a dimensional hierarchy having a plurality of elements; generating, using the one or more processors, a dimensional hierarchy vector corresponding to the structural characteristics of a dimensional hierarchy, wherein the dimensional hierarchy vector describes a structural relationship indicating where an element appears in the dimensional hierarchy with respect to other elements within the dimensional hierarchy; creating, using the one or more processors, one or more keys using the dimensional hierarchy vector, wherein each key is assigned to an element in the dimensional hierarchy, wherein each key is stored in a first index vector, and wherein the keys in the first index vector are used to perform a search based upon a query; receiving a query using the one or more processors, wherein the query is used to formulate a logical expression based upon the dimensional hierarchy vector; and using the logical expression and the one or more keys that are associated with the dimensional hierarchy vector in the first index vector to generate a second index vector using the one or more processors, wherein the second index vector is 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.