1. A method of executing a query against a first database object that is partitioned using a partition definition based upon information located in a second database object, comprising: accessing metadata comprising the partition definition; using the partition definition and a predicate in the query to determine a set of one or more partitions for the first database object, the one or more partitions for the first database object being based upon information located in the second database object, wherein the second database object comprises a dimension table with a row that corresponds to a data item in the first database object, the row of the dimension table providing detailed information relevant to the data item in the first database object, and wherein a part of the detailed information comprises the information for the partition of the first database object wherein the metadata is accessed from a data dictionary that is different from the second database object; and pruning from the set of the one or more partitions one or more partitions that are not relevant to the query, wherein the act of pruning is performed at compile time or at execution time for the query.