IP Library Granted Patent US 10,789,232
Granted Patent B2
US 10,789,232 · App. 15/952,066 · Granted Sep 29, 2020

Method and system for generating a query plan for time series data

Inventor: Clement Pang (Sunnyvale, CA)
Assignee: VMware, Inc.
G06F16/2272G06F16/2455G06F16/2477G06F16/24542G06F16/24549G06F16/24552
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,789,232
App. No.
15/952,066
Granted
Sep 29, 2020
Kind
B2
Abstract

In a method for generating a query plan for time series data, a query for time series data is received, the query including elements. The query is parsed to identify the elements and operators between the elements. First stages for a plurality of paths of execution are determined based at least in part on the elements and the operators. At least a first stage for the plurality of paths of execution is executed. The plurality of paths of execution is evaluated after completion of the first stage. Based on the evaluating, a subset of paths of execution is selected for continued execution and evaluation.

Claims (71)

1. A method for generating a query plan for time series data, the method comprising:

receiving a query for time series data, the query comprising elements;

parsing the query to identify the elements and operators between the elements;

determining first stages for a plurality of paths of execution based at least in part on the elements and the operators;

executing at least a first stage for the plurality of paths of execution;

evaluating the plurality of paths of execution after completion of the first stage; and

based on the evaluating, selecting a subset of paths of execution for continued execution and evaluation.

2. The method of claim 1 , wherein the elements comprise at least one of a metric, a host, and a tag.

3. The method of claim 1 , wherein the executing the at least a first stage for the plurality of paths of execution comprises:

executing at least a first stage for the plurality of paths of execution concurrently.

4. The method of claim 1 , further comprising:

determining a second stage for the subset of paths of execution;

executing the second stage for the subset of paths of execution; and

evaluating the subset of paths of execution after completion of the second stage.

5. The method if claim 4 , wherein the determining a second stage for the subset of paths of execution comprises:

determining a presumptive cost associated with executing the second stage of the subsets of paths of execution; and

determining the second stage for the subset of paths of execution based at least in part on the presumptive cost associated with executing the second stage of the subsets of paths of execution.

6. The method of claim 4 , further comprising:

selecting, based on the evaluating the subset of paths of execution, a path of execution of the plurality of paths of execution as the query plan.

7. The method of claim 1 , wherein the executing at least a first stage for the plurality of paths of execution comprises:

for each path of execution:

determining an index to access based on an element of the path of execution; and

scanning the index to identify a culled solution set based on the element for resolving the query.

8. The method of claim 7 , wherein the index is one of a prefix index, a trigram index, a two-tier index, and a three-tier index.

9. The method of claim 1 , wherein the executing at least a first stage for the plurality of paths of execution further comprises:

for each path of execution:

determining a cost associated with executing the first stage of the path of execution; and

caching the cost associated with executing the first stage of the path of execution.

10. The method of claim 1 , wherein the evaluating the plurality of paths of execution comprises:

for each path of execution:

determining a cost associated with executing the at least a first stage of the path of execution; and

evaluating the path of execution based at least in part on the cost associated with executing the at least a first stage of the path of execution.

11. The method of claim 1 , wherein the selecting a subset of paths of execution for continued execution and evaluation comprises:

selecting a path of execution having a lowest cost of execution of the first stage for inclusion within the subset of paths of execution; and

selecting additional paths of execution having a cost that satisfies a threshold for inclusion within the subset of paths of execution.

12. The method of claim 11 , wherein the threshold comprises a multiple of the lowest cost of execution such that paths of execution for which the cost is within the multiple of the lowest cost of execution are selected for inclusion within the subset of paths of execution.

13. The method of claim 11 , wherein the threshold comprises a number of paths that have a cost closest to the lowest cost of execution such that paths of execution the number of paths closest to the lowest cost of execution are selected for inclusion within the subset of paths of execution.

14. A non-transitory computer readable storage medium having computer readable program code stored thereon for causing a computer system to perform a method for generating a query plan for time series data, the method comprising:

receiving a query for time series data, the query comprising elements;

analyzing the query to determine initial stages of a plurality of paths of execution of the query on the times series data;

executing a stage of at least a subset of the plurality of paths of execution concurrently;

evaluating executed paths of execution;

selecting, based on the evaluating, at least two executed paths for continued execution and evaluation; and

repeating the executing, the evaluating, and the selecting until a final path of execution is selected.

15. The non-transitory computer readable storage medium of claim 14 , wherein the executing a stage of at least a subset of the plurality of paths of execution comprises:

for each path of execution:

determining an index to access based on an element of the path of execution; and

scanning the index to identify a culled solution set based on the element for resolving the query.

16. The non-transitory computer readable storage medium of claim 14 , wherein the executing a stage of at least a subset of the plurality of paths of execution concurrently comprises:

determining a presumptive cost associated with executing a next stage of selected paths of execution; and

determining the subset of the plurality of paths of execution based at least in part on the selected paths of execution and the presumptive cost associated with executing a next stage of selected paths of execution.

17. The non-transitory computer readable storage medium of claim 14 , wherein the executing a stage of at least a subset of the plurality of paths of execution concurrently comprises:

for each path of execution:

determining a cost associated with executing the stage of the path of execution; and

caching the cost associated with executing the stage of the path of execution.

18. The non-transitory computer readable storage medium of claim 14 , wherein the evaluating executed paths of execution comprises:

for each path of execution:

determining a cost associated with executing the stage of the path of execution; and

evaluating the path of execution based at least in part on the cost associated with executing the stage of the path of execution.

19. The non-transitory computer readable storage medium of claim 14 , wherein the selecting, based on the evaluating, at least two executed paths for continued execution and evaluation comprises:

selecting a path of execution having a lowest cost of execution of the stage for inclusion within the subset of paths of execution; and

selecting additional paths of execution having a cost that satisfies a threshold for inclusion within the subset of paths of execution.

20. A system for generating a query plan for time series data, the system comprising:

a data storage unit; and

a processor communicatively coupled with the data storage unit, the processor configured to:

receive a query for time series data, the query comprising elements;

parse the query to identify the elements and operators between the elements;

determine first stages for a plurality of paths of execution based at least in part on the elements and the operators;

execute at least a first stage for the plurality of paths of execution;

evaluate the plurality of paths of execution after completion of the first stage; and

select a subset of paths of execution for continued execution and evaluation based on the evaluation of the plurality of paths of execution after completion of the first stage.

Assignments (2)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067102/0395 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 24, 2018
From: PANG, CLEMENT
To: VMWARE, INC.
Reel/Frame 045893/0400 →
Continuity (2)
Provisional Application 62550171 · Aug 25, 2017
Related Publication 20190065549A1 · Feb 28, 2019