IP Library › Granted Patent US 10,552,414
Granted Patent B2
US 10,552,414 · App. 15/493,271 · Granted Feb 4, 2020

Method for query execution planning

Inventors: Andreas Brodt (Gerlingen, DE); Oliver Schiller (Dettingen, DE); Marc Schwind (Holzgerlingen, DE); Mathias Trumpp (Ulm, DE)
Assignee: International Business Machines Corporation
G06F16/24542G06F16/2282G06F16/2462G06F16/24545
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,552,414
App. No.
15/493,271
Granted
Feb 4, 2020
Kind
B2
Abstract

The present disclosure provides a computer implemented method and system for processing queries. The first data table comprises a set of data blocks. Each of the set of data blocks may be assigned respective attribute value information. A query involving a query condition on at least a first attribute of the first data table may be received. And a subset of the set of data blocks to be accessed may be selected based on the query condition and using the attribute value information. Furthermore, a guaranteed bound may be determined for a statistical metric on the first attribute based on at least one of the number of data blocks of the subset of data blocks and the attribute value information of the subset of data blocks. The guaranteed bound for the statistical metric may be used when determining a query execution plan for the received query.

Claims (56)

1. A computer implemented method for processing queries on a first data table, the method comprising:

providing attribute value information for a set of data blocks;

receiving, using a computer, a query involving a query condition on at least a first attribute of the first data table;

selecting a subset of the set of data blocks to be accessed based on the query condition and using the attribute value information;

determining a guaranteed bound for a statistical metric on a first attribute based on at least one of the number of data blocks of the subset of data blocks and the attribute value information of the subset of data blocks, wherein the guaranteed bound comprises an upper bound for the statistical metric, the statistical metric being a number of distinct values of the first attribute in the subset of data blocks,

wherein the attribute value information of the data block is indicative of a minimum and maximum values of the first attribute in the data block, the method comprising determining a smallest minimum (α c ) and a largest maximum (ω c ) values of the first attribute, representing a range of values, in the subset of data blocks using the attribute value information of the subset of data blocks, the upper bound for the number of distinct values of the first attribute being defined by the following formula: ω c −α c +1, and

wherein the range of values comprises at least two sub ranges separated by at least one gap (n) covering a range of values (ω i −α i +1) of the first attribute higher than a predefined threshold gap, the upper bound for the number of distinct values of the first attribute being defined by the following formula:

ω

c

-

α

c

+

1

-

∑

i

=

1

n

⁢

(

ω

i

-

α

i

+

1

)

and

determining a query execution plan for the received query using the guaranteed bound for the statistical metric.

2. The method of claim 1 , wherein the guaranteed bound comprises an upper bound for the statistical metric being a number of rows in the subset of data blocks.

3. The method of claim 2 , wherein the upper bound for the number of rows is defined by adding estimated largest possible number of rows in each data block of the subset of data blocks.

4. The method of claim 2 , wherein the set of data blocks comprises a same number of rows, the upper bound for the number of rows being:

table

⁢

⁢

cardinality

*

Q

#

⁢

⁢

total

⁢

⁢

data

⁢

⁢

blocks

wherein table cardinality is the number of rows in the first data table, |Q| is the number of data blocks in the subset of data blocks and #total data blocks is the number of data blocks in the set of data blocks.

5. The method of claim 1 , wherein the first attribute comprises at least one of: integer number, fixed size string, decimals, fixed size string, Boolean, enumeration.

6. The method of claim 1 , wherein the query includes a query condition on the first attribute and a second attribute of the first data table, the query conditions on the first and second attributes are dependent on each other.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2017
From: BRODT, ANDREAS; SCHILLER, OLIVER; SCHWIND, MARC; TRUMPP, MATHIAS
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 042307/0259 →
Continuity (2)
Continuation 15073890 · Mar 18, 2016
Related Publication 20170270161A1 · Sep 21, 2017