IP Library › Granted Patent US 11,409,743
Granted Patent B2
US 11,409,743 · App. 16/724,565 · Granted Aug 9, 2022

Property learning for analytical functions

Inventors: Mohamed Ahmed Yassin Eltabakh (Worcester, MA); Mohammed Al-Kateb (Rancho Palos Verdes, CA); Awny Kayed Al-Omari (Cedar Park, TX); Sanjay Nair (El Segundo, CA)
Assignee: Teradata US, Inc.
G06F16/24542G06F16/252G06N20/00
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 11,409,743
App. No.
16/724,565
Granted
Aug 9, 2022
Kind
B2
Abstract

In some examples, a system learns properties of an analytical function based on information of queries invoking the analytical function that have been previously executed, creates a function descriptor for the analytical function based on the learning, and provides the function descriptor for use by an optimizer in generating an execution plan for a received database query that includes the analytical function.

Claims (40)

1. A non-transitory machine-readable storage medium comprising instructions that upon execution cause a system to:

build a training repository by adding information of queries invoking an analytical function that have been previously executed to the training repository;

learn properties of the analytical function based on the information of the queries in the training repository;

create a function descriptor for the analytical function based on the learning; and

provide the function descriptor for use by an optimizer in generating an execution plan for a received database query that includes the analytical function.

2. The non-transitory machine-readable storage medium of claim 1 , wherein the building of the training repository comprises incrementally building the training repository as queries are received by the system.

3. The non-transitory machine-readable storage medium of claim 1 , wherein the adding of the information of the queries to the training repository comprises:

adding a syntax of the queries to the training repository; and

adding sample data sets of input tables for the queries in the training repository.

4. The non-transitory machine-readable storage medium of claim 1 , wherein the learned properties include a projection-push property relating to mandatory attributes of the analytical function.

5. The non-transitory machine-readable storage medium of claim 4 , wherein the projection-push property relates to a minimal set of attributes for correct execution of the analytical function.

6. The non-transitory machine-readable storage medium of claim 4 , wherein the learning of the projection-push property comprises indicating if an attribute in a database query is a mandatory attribute based on one or more heuristics.

7. The non-transitory machine-readable storage medium of claim 6 , wherein the one or more heuristics comprise one or more selected from among an explicit reference to the attribute in a PARTITION BY clause or an ORDER by clause, an explicit reference to the attribute in a parameter of the analytical function, an implicit reference to the attribute in a database query, a reference to the attribute in an outer query outside of an invocation of the analytical function, or references missing to any attribute.

8. The non-transitory machine-readable storage medium of claim 6 , wherein the learning of the projection-push property produces a candidate instruction set corresponding to selection of one or more mandatory attributes.

9. The non-transitory machine-readable storage medium of claim 8 , wherein the instructions upon execution cause the system to:

send the candidate instruction set to a domain expert,

wherein the function descriptor is based on feedback from the domain expert, the feedback approving or modifying the candidate instruction set.

10. The non-transitory machine-readable storage medium of claim 1 , wherein the learned properties include a predicate-push property relating to whether a predicate to be applied on an output of the analytical function as specified by a database query can be moved to apply to an input of the analytical function.

11. The non-transitory machine-readable storage medium of claim 10 , wherein the learning of the predicate-push property comprises indicating whether the predicate can be moved based on one or more heuristics.

12. The non-transitory machine-readable storage medium of claim 11 , wherein the one or more heuristics comprise one or more of an attribute in the predicate matching an attribute in an input to the analytical function, or a data type of the attribute in the predicate matching a data type of the attribute in the input to the analytical function.

13. The non-transitory machine-readable storage medium of claim 11 , wherein the learning of the predicate-push property produces a candidate value of a property, and wherein the instructions upon execution cause the system to:

send the candidate value of the property to a domain expert,

wherein the function descriptor is based on feedback from the domain expert, the feedback approving or modifying a candidate instruction set.

14. The non-transitory machine-readable storage medium of claim 10 , wherein the predicate-push property comprises a row-independence property indicating whether the analytical function can be applied on a row independently of other rows.

15. The non-transitory machine-readable storage medium of claim 14 , wherein the row-independence property being false indicates that the predicate cannot be moved to apply to the input of the analytical function.

16. The non-transitory machine-readable storage medium of claim 10 , wherein the predicate-push property comprises a partition-independence property indicating whether the analytical function can be applied on a partition independently of other partitions.

17. The non-transitory machine-readable storage medium of claim 16 , wherein the partition-independence property being false indicates that the predicate cannot be moved to apply to the input of the analytical function.

18. A method performed by a system comprising a hardware processor, comprising:

building a training repository comprising information of queries invoking an analytical function that have been executed in a database management system;

autonomously learning properties of the analytical function based on the information of the queries invoking the analytical function;

creating a function descriptor for the analytical function based on the learning; and

providing the function descriptor for use by an optimizer in the database management system for generating an execution plan for a received database query that includes the analytical function.

19. The method of claim 18 , wherein the learning of the properties of the analytical function uses one or more heuristics, and is further based on mocked execution using a sample of a primary table.

20. A system comprising:

a processor; and

a non-transitory storage medium storing instructions executable on the processor to:

build a training repository by adding information of queries invoking an analytical function that have been previously executed to the training repository;

learn properties of the analytical function based on the information of the queries in the training repository;

create a function descriptor for the analytical function based on the learning; and

provide the function descriptor for use by an optimizer in generating an execution plan for a received database query that includes the analytical function.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 15, 2020
From: ELTABAKH, MOHAMED AHMED YASSIN; AL-KATEB, MOHAMMED; KAYED AL-OMARI, AWNY; NAIR, SANJAY
To: TERADATA US, INC.
Reel/Frame 051524/0694 →
Continuity (2)
Provisional Application 62881815 · Aug 1, 2019
Related Publication 20210034624A1 · Feb 4, 2021