# US 2017/0293657 A1 · Accelerating Queries with Zone Map Enhancements

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0293657 A1
- Document ID: US20170293657A1
- Status: Published application
- Kind: A1
- Application number: 15/096,736
- Filed: 2016-04-12
- Published: 2017-10-12
- Earliest claimed: 2016-04-12
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Steven A. Kirk; Roland F. McKenney
- Web page: https://patentgrep.com/patent/US20170293657A1

## CPC

- G06F 16/24549: {Run-time optimisation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed herein are system, method, and computer program product embodiments for accelerating queries with zone map enhancements. An embodiment operates by receiving a query, including a condition on a column of data within a table with one or more data zones. For the condition, the data zones of the database are classified based on per zone metadata. These data zone categories include: guaranteed zones that only include data that satisfies the condition; border zones that include data that may or may not satisfy the condition; and disqualified zones that only include data that does not satisfy the condition. The rows of the border zones that satisfy the condition are identified. From amongst the rows of the guaranteed zones and the identified rows of the border zones that satisfy the range condition, a result set of rows that satisfy the condition are identified. The result set is returned.

## Claims

### Claim 1

A computer implemented method, comprising:
receiving a query on data of a database, the query including a condition on a column of data within a table, wherein the column data is stored across a plurality of data zones:
classifying, based on metadata associated with the data zones, which data zones are guaranteed zones that only include data that satisfies the condition, border zones that include data that may or may not satisfy the condition, and disqualified zones that only include data that does not satisfy the condition;
identifying which rows within the border zones contain column values that satisfy the condition;
determining, by combining the rows from within the guaranteed zones and the identified rows from within the border zones that satisfy the condition, a result set of rows that satisfy the condition of the query; and
returning the result set of rows that satisfy the query;
wherein at least one of the receiving, classifying, identifying, determining, and returning are performed by one or more computers.

### Claim 2 (depends on 1)

The method of claim 1, wherein the classifying based on the metadata comprises:
classifying, based on metadata that includes a minimum column value and a maximum column value, which of the data zones are guaranteed, border, and disqualified zones.

### Claim 3 (depends on 1)

The method of claim 1, wherein the metadata comprises a zone dictionary for a respective data zone, the zone dictionary including a set of distinct column values within the respective data zone.

### Claim 4 (depends on 1)

The method of claim 1, wherein the data zones each comprises one or more data pages of the database table.

### Claim 5 (depends on 4)

The method of claim 4, wherein each data zone corresponds to a disjoint subset of the data pages for a column within a column-oriented database.

### Claim 6 (depends on 1)

The method of claim 1, wherein the result set comprises a first set of rows from the identified guaranteed zones for which the condition is not evaluated upon the first set of rows, and a second set of rows from the identified border zones for which the condition is both evaluated and satisfied upon the second set of rows.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
determining a zone condition that one of: every zone is a border zone, there are no border zones, there are no guaranteed zones, or every zone is a border zone; and
transforming the condition of the query against the rows based on the determined zone condition.

### Claim 8 (depends on 6)

The method of claim 6,
evaluating the range condition and a local condition to determine a use factor of both the range condition and the local condition prior to the identifying which data zones; and
ordering the conditions based on the use factor of the conditions.

### Claim 9 (depends on 8)

The method of claim 8, wherein the use factor is calculated based on a ratio of a percentage of rows eliminated based on the condition and a cost of evaluating the respective condition.

### Claim 10 (depends on 7)

The method of claim 7, wherein the transformed condition is evaluated using bitmaps to represent the sets of rows within each zone, and the sets of rows that satisfy each condition

### Claim 11

A system, comprising:
at least one processor coupled to a non-transitory memory and configured to:
receive a query on data of a database, the query including a range condition and a local condition, wherein the data is stored across a plurality of data zones;
classify, amongst the data zones, which data zones are guaranteed zones that only include data that satisfies the range condition, border zones that include data that may or may not satisfy the range condition, and disqualified zones that only includes data that does not satisfy the range condition;
identify which rows within the border zones contain column values that satisfy the condition;
determine, from amongst rows of the guaranteed zones and the identified rows of the border zones that satisfy the range condition, a result set of rows that satisfy the local condition of the query; and
return the result set of rows that satisfy the query.

### Claim 12 (depends on 11)

The system of claim 11, wherein to classify which data zones the processor is configured to:
classify, based on metadata associated with zone maps of each data zone, which of the data zones are guaranteed, border, and disqualified zones, wherein the metadata includes a minimum value and maximum value for the data of its corresponding data zone.

### Claim 13 (depends on 11)

The system of claim 11, wherein the data zones each comprises one or more data pages of the database table.

### Claim 14 (depends on 11)

The system of claim 11, wherein to identify which data zones the processor is configured to:
determine the rows of the guaranteed zones that satisfy the range condition without performing a row-by-row processing of each row of the one or more guaranteed zones.

### Claim 15 (depends on 11)

The system of claim 11, wherein the processor is further configured to:
evaluate the local condition and any other conditions to determine a use factor of both the range condition and the local condition prior to the identifying which data zones.

### Claim 16 (depends on 15)

The system of claim 15, wherein to evaluate the processor is configured to:
order the range condition and the local condition based on the use factor, wherein the condition with a higher use factor is evaluated before the condition with a lower use factor.

### Claim 17 (depends on 16)

The system of claim 16, wherein the result set comprises a first set of rows from the identified guaranteed zones for which the condition is not evaluated upon the first set of rows, and a second set of rows from the identified border zones for which the condition is both evaluated and satisfied upon the second set of rows.

### Claim 18 (depends on 15)

The system of claim 15, wherein the use factor is calculated based on a ratio of a percentage of rows eliminated based on the condition and a cost of evaluating the respective condition.

### Claim 19

A tangible computer-readable device having instructions stored thereon that, when executed by at least one computing device, causes the at least one computing device to perform operations comprising:
receiving a query on data of a database, the query including a condition on a column of data within a table, wherein the column data is stored across a plurality of data zones;
classifying, based on metadata associated with the data zones, which data zones are guaranteed zones that only include data that satisfies the condition, border zones that include data that may or may not satisfy the condition, and disqualified zones that only include data that does not satisfy the condition;
identifying which rows contain column values in the border zones that satisfy the condition;
determining, by combining the rows from within the guaranteed zones and the identified rows from within the border zones that satisfy the condition, a result set of rows that satisfy the condition of the query; and
returning the result set of records that satisfy the query.

### Claim 20 (depends on 19)

The device of claim 19, wherein the metadata comprises a zone dictionary for a respective data zone, the zone dictionary including a set of distinct column values within the respective data zone.
