# US 10,503,508 B2 · Predictive query execution in analytical databases

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

- Number: US 10,503,508 B2
- Document ID: US10503508B2
- Status: Granted
- Kind: B2
- Application number: 15/287,600
- Filed: 2016-10-06
- Published: 2018-04-12
- Granted: 2019-12-10
- Earliest claimed: 2016-10-06
- Assignees: Sisense Ltd.
- Applicants: Sisense, Ltd.
- Inventors: Jonathan Goldfeld; Ariel Yaroshevich; Eldad Farkash
- Web page: https://patentgrep.com/patent/US10503508B2

## CPC

- G06F 16/24561: {Intermediate data storage techniques for performance improvement}
- G06F 9/30072: {to perform conditional operations, e.g. using predicates or guards}
- G06F 16/24552: {Database cache management}
- G06F 16/24553: {of query operations}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computerized system (e.g. implementing a database management system, abbreviated as DBMS) and a method of operating the system is disclosed for allowing predictive execution of instructions and/or queries. As disclosed herein, in predictive execution mode (also referred to herein as “predictive mode”), instructions and/or queries are executed by the computerized system (e.g. a DBMS) before a request to execute the instructions and/or queries is received from an external entity (e.g. host).

## Claims

### Claim 1

A computer implemented method of executing queries in a database system operating according to an operator-at-a-time execution model; the method comprising, operating a processing circuitry for:
storing in a persistent computer storage medium, information indicative of instructions previously executed in the database system;
responsive to an indication that at least one condition has been met:
executing a group of instructions comprising part or all of the instructions previously executed in the database system, wherein at least one given instruction in the group is executed before a corresponding request to execute the given instruction is received at the database system;
linking each intermediate, resulting from the execution of a respective instruction in the group of instructions, to a node in a data-structure that interrelates the node to at least one other node of the data-structure, the node representing the respective instruction, wherein different nodes in the data-structure represent different respective intermediates and instructions, wherein each intermediate is generated by execution of a respective instruction being part of a query;
storing the intermediates resulting from the execution of the instructions in the group in a computer memory in the database system and rendering the intermediates to be available during execution of future database queries.

### Claim 2 (depends on 1)

The method according to claim 1 further comprising:
recording query history metadata characterizing the instructions previously executed in the database system;
analyzing the query history metadata; and
selecting, based on the analysis, the group of instructions.

### Claim 3 (depends on 2)

The method of claim 2, wherein the information indicative of instructions previously executed in the database system includes the query history metadata; and wherein the analyzing and selecting is executed following the indication that at least one condition has been met.

### Claim 4 (depends on 2)

The method of claim 2, wherein the information indicative of instructions previously executed in the database system includes the group of instructions; and wherein the analyzing and selecting is executed during normal operation of the database system before the indication that at least one condition has been met.

### Claim 5 (depends on 2)

The method of claim 2, wherein the query history metadata includes information indicative of a frequency of execution and/or frequency of requests of part or all of the instructions previously executed in the database system;
the selecting comprises, adding to the group, instructions characterized by a frequency of execution and/or frequency of request which complies with one or more conditions.

### Claim 6 (depends on 1)

The method of claim 1 further comprising, selecting the group of instructions, the selecting comprising:
identifying in the database a database schema; and
adding to the group of instructions one or more instructions which are frequently used with the identified schema.

### Claim 7 (depends on 6)

The method of claim 6 wherein the schema is a star schema.

### Claim 8 (depends on 1)

The method of claim 1 wherein the at least one condition includes a system event rendering previously stored intermediates unavailable for recycling intermediates.

### Claim 9 (depends on 8)

The method of claim 8 wherein the system event includes one or more of: system reboot; system data update; and system duplication.

### Claim 10 (depends on 1)

The method of claim 1 further comprising synchronizing at least the executing a group of one or more instructions, to a system idle time.

### Claim 11 (depends on 1)

The method of claim 1 wherein the data-structure is one of a tree and a graph.

### Claim 12 (depends on 1)

The method of claim 1 wherein the query history metadata is stored in the data-structure, wherein a node in the data-structure representing a given instruction is used for storing query history metadata pertaining to the given instruction.

### Claim 13 (depends on 1)

The method of claim 1 further comprising executing a database query, comprising:
dividing the query into one or more instructions to generate a respective instruction set;
for each instruction in the instruction set, determining a respective intermediate, comprising: when a respective intermediate is available in the computer memory, retrieving the intermediate from the computer memory;
otherwise, when a respective intermediate is not available in the computer memory, executing the instruction to determine a respective intermediate; and
calculating the query result using the determined intermediates.

### Claim 14

A computerized device operating in a database system operating according to an operator-at-a-time execution model; the computerized device being operatively connected to a persistent computer storage medium and comprising a processing circuitry configured to:
store in a persistent computer storage medium, information indicative of instructions previously executed in the database system;
responsive to an indication that at least one condition has been met:
execute a group of instructions comprising part or all of the instructions previously executed in the database system, wherein at least one given instruction in the group is executed before a corresponding request to execute the given instruction is received at the database system;
link each intermediate, resulting from the execution of a respective instruction in the group of instructions, to a node in a data-structure that interrelates the node to at least one other node of the data-structure, the node representing the respective instruction, wherein different nodes in the data-structure represent different respective intermediates and instructions, wherein each intermediate is generated by execution of a respective instruction being part of a query;
store the intermediates resulting from the execution of the instructions in the group in a computer memory in the database system and rendering the intermediates to be available during execution of future database queries.

### Claim 15 (depends on 14)

The computerized device of claim 14 wherein the processing circuitry is further configured to:
record query history metadata characterizing the instructions previously executed in the database system;
analyze the query history metadata; and select, based on the analysis, the group of instructions.

### Claim 16 (depends on 15)

The computerized device of claim 15, wherein the information indicative of instructions previously executed in the database system includes the query history metadata; and wherein the analyzing and selecting is executed following the indication that at least one condition has been met.

### Claim 17 (depends on 15)

The computerized device of claim 15, wherein the information indicative of instructions previously executed in the database system includes the group of instructions; and wherein the analyzing and selecting is executed during normal operation of the database system before the indication that at least one condition has been met.

### Claim 18 (depends on 15)

The computerized device of claim 15, wherein the query history metadata includes information indicative of a frequency of execution and/or frequency of requests of part or all of the instructions previously executed in the database system;
the processing circuitry is configured for selecting the group of instructions to: add to the group instructions characterized by a frequency of execution and/or frequency of request which complies with one or more conditions.

### Claim 19 (depends on 14)

The computerized device of claim 14 wherein the processing circuitry is further configured to select the group of instructions, the selecting comprising:
identifying in the database a database schema;
adding to the group of instructions one or more instructions which are frequently used with the identified schema.

### Claim 20 (depends on 14)

The computerized device of claim 14 wherein the at least one condition includes a system event rendering previously stored intermediates unavailable for recycling intermediates.

### Claim 21 (depends on 20)

The computerized device of claim 20 wherein the system event includes one or more of: system reboot; system data update; and system duplication.

### Claim 22 (depends on 20)

The computerized device of claim 20 wherein the processing circuitry is configured to synchronize at least the executing a group of one or more instructions, to a system idle time.

### Claim 23 (depends on 14)

The computerized device of claim 14 wherein the data-structure is one of a tree and a graph.

### Claim 24 (depends on 14)

The computerized device of claim 14, wherein the processing circuitry is further configured to store the query history metadata in the data-structure, wherein a node in the data-structure representing a given instruction is used for storing query history metadata pertaining to the given instruction.

### Claim 25

A database management system (DBMS) comprising a query kernel operating in a database system operating according to an operator-at-a-time execution model; the query kernel being operatively connected to a persistent computer storage medium and comprising a processing circuitry configured to:
store in a persistent computer storage medium, information indicative of instructions previously executed in the database system;
responsive to an indication that at least one condition has been met:
execute a group of instructions comprising part or all of the instructions previously executed in the database system, wherein at least one given instruction in the group is executed before a corresponding request to execute the given instruction is received at the database system;
link each intermediate, resulting from the execution of a respective instruction in the group of instructions, to a node in a data-structure that interrelates the node to at least one other node of the data-structure, the node representing the respective instruction, wherein different nodes in the data-structure represent different respective intermediates and instructions, wherein each intermediate is generated by execution of a respective instruction being part of a query;
store the intermediates resulting from the execution of the instructions in the group in a computer memory in the database system and rendering the intermediates to be available during execution of future database queries.

### Claim 26

A non-transitory program storage device readable by a computerized device, tangibly embodying a program of instructions executable by the computerized device to perform method operations of executing queries in a database system operating according to an operator-at-a-time execution model; the method comprising:
storing in a persistent computer storage medium, information indicative of instructions previously executed in the database system;
responsive to an indication that at least one condition has been met:
executing a group of instructions comprising part or all of the instructions previously executed in the database system, wherein at least one given instruction in the group is executed before a corresponding request to execute the given instruction is received at the database system;
linking each intermediate, resulting from the execution of a respective instruction in the group of instructions, to a node in a data-structure that interrelates the node to at least one other node of the data-structure, the node representing the respective instruction, wherein different nodes in the data-structure represent different respective intermediates and instructions, wherein each intermediate is generated by execution of a respective instruction being part of a query;
storing the intermediates resulting from the execution of the instructions in the group in a computer memory in the database system and rendering the intermediates to be available during execution of future database queries.
