Abstract:
Techniques are presented herein for storing cursor duration temporary tables in memory of nodes in a clustered database system in association with iterations of an iterative query operation. The techniques involve associating a portion of memory with one or more iteration values. The iteration values indicate which iterations correspond to data that is stored in the portion of memory. When data is requested for a particular iteration, portions of memory are checked to determine if it stores the particular iteration.
Abstract:
Techniques are provided for generating a “dimensional zonemap” that allows a database server to avoid scanning disk blocks of a fact table based on filter predicates in a query that qualify one or more dimension tables. The zonemap divides the fact table into sets of contiguous disk blocks referred to as “zones”. For each zone, a minimum value and a maximum value for each of one or more “zoned” columns of the dimension tables is determined and maintained in the zonemap. For a query that contains a filter predicate on a zoned column, the predicate value can be compared to the minimum value and maximum value maintained for a zone for that zoned column to determine whether a scan of the disk blocks of the zone can be skipped.
Abstract:
Embodiments generate random walks through a directed graph that is represented in a relational database table. Each row of the graph table represents a directed edge in the graph and includes a source vertex and a destination vertex. Each row is further augmented to (a) indicate the number of outbound edges starting from the destination vertex in the row and (b) include an identifier that distinguishes the edge from other outbound edges starting from the same source vertex. An SQL query may be executed on the augmented graph table. Starting from a source vertex (starting vertex or the destination vertex of the previously selected hop) the query randomly selects a row of the graph table representing one of the outbound edges from the source vertex and adds the selected outbound edge as a row in a random walk table that represents the next hop in the random walk.
Abstract:
Techniques are provided for bitmap-based computation of a COUNT(DISTINCT) function, where the bitmaps are generated based on ranks of target expression values. According to an embodiment, the ranks are computed using the DENSE_RANK function. The bitmaps may be maintained in a materialized view. Bitmap data that represents the ranks for target expression values occurring in data for a given group is divided across multiple bucket bitmaps, each corresponding to a distinct sub-range of the ranks. According to an embodiment, target expression value ranks are computed relative to partitions of the target expression values. When these partitions correspond to a subset (not necessarily strict) of the target query grouping keys for a query rewrite, the resulting bitmaps allow computation of multiple levels of aggregation from the single set of bitmaps.
Abstract:
Techniques for the automatic creation and maintenance of zone maps are provided. In one technique, a set of data sets is identified. For each data set, a data set width is determined based on a maximum value in the data set and a minimum value in the data set. One or more zones within the data set are identified. For each zone, a zone width is determined based on a difference between a maximum value in that zone and a minimum value in that zone. An aggregate zone width is generated that is based on the zone width of each zone. Based on the data set width and the aggregate zone width, it is determined whether to automatically generate a zone map for the data set.
Abstract:
Techniques are provided for generating a “dimensional zonemap” that allows a database server to avoid scanning disk blocks of a fact table based on filter predicates in a query that qualify one or more dimension tables. The zonemap divides the fact table into sets of contiguous disk blocks referred to as “zones”. For each zone, a minimum value and a maximum value for each of one or more “zoned” columns of the dimension tables is determined and maintained in the zonemap. For a query that contains a filter predicate on a zoned column, the predicate value can be compared to the minimum value and maximum value maintained for a zone for that zoned column to determine whether a scan of the disk blocks of the zone can be skipped.
Abstract:
Techniques for using zone map information for post index access pruning. In one embodiment, for example, a method for using zone map information for post index access pruning comprises: receiving a query statement comprising a first filter predicate on an indexed column of a database table and a second filter predicate on a zoned column of a database table; identifying zero or more pruneable zones of a zone map based on a value for the zoned column in the second filter predicate; obtaining a set of data record addresses from an index on the indexed column based on a value for the indexed column in the first filter predicate; and pruning, from access paths for processing the query statement, any data records, corresponding to data record addresses in the set of data record addresses, that are physically located in one of the pruneable zones.
Abstract:
Techniques for partition pruning based on aggregated zone map information. In one embodiment, for example, a method for pruning partitions based on aggregated zone map information comprises: receiving a query statement comprising a filter predicate on a column of a database table; and pruning one or more partitions of the database table from access paths for processing the query statement based on determining, based on aggregated zone map information associated with the one or more partitions, that the filter predicate cannot be satisfied by data stored in the one or more partitions.
Abstract:
Techniques are provided for generating a “dimensional zonemap” that allows a database server to avoid scanning disk blocks of a fact table based on filter predicates in a query that qualify one or more dimension tables. The zonemap divides the fact table into sets of contiguous disk blocks referred to as “zones”. For each zone, a minimum value and a maximum value for each of one or more “zoned” columns of the dimension tables is determined and maintained in the zonemap. For a query that contains a filter predicate on a zoned column, the predicate value can be compared to the minimum value and maximum value maintained for a zone for that zoned column to determine whether a scan of the disk blocks of the zone can be skipped.
Abstract:
Techniques are provided that address the problems associated with prior approaches for clustering a fact table in a relational database management system. According to one aspect of the invention, a database server clusters a fact table in a database based on one or more dimension tables. More specifically, rows are stored in the fact table in a sorted order and the order in which the rows are sorted is based on values in one or more columns of one or more of the dimension tables. A user specifies the columns of the dimension tables on which the sorted order is based in “clustering criteria”. The database server uses the clustering criteria to automatically store the rows in the fact table in the sorted order in response to certain user-initiated database operations on the fact-table.