IP Library Granted Patent US 9,189,523
Granted Patent B2
US 9,189,523 · App. 12/242,616 · Granted Nov 17, 2015

Predicting performance of multiple queries executing in a database

Inventors: Archana Sulochana Ganapathi (Palo Alto, CA); Harumi Anne Kuno (Cupertino, CA); Umeshwar Dayal (Saratoga, CA)
Assignee: Hewlett-Packard Development Company, L.P.
G06F17/30469
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 9,189,523
App. No.
12/242,616
Granted
Nov 17, 2015
Kind
B2
Abstract

One embodiment is a method that generates query vectors from query plans and performance vectors from data collected while executing multiple queries in a database. A machine learning technique (MLT) computes distances between two query vectors and two performance vectors and then predicts performance of plural queries executing in the database.

Claims (30)

1. A method comprising: generating query vectors from query plans that include query operators; generating performance vectors that include performance metrics collected while executing multiple queries in a database; using a machine learning technique (MLT) to cluster the multiple queries with similar query vectors and similar performance vectors; and using the MLT to predict performance of multiple queries executing in multiple simultaneous streams in the database, wherein the query vectors include a number of instances of each operator in the query plans.

2. The method of claim 1 further comprising using the MLT to compute a query distance between two query vectors and a performance distance between two performance vectors.

3. The method of claim 1 , wherein the query vectors include a sum of cardinalities of each instance of the query operators in the query plans.

4. The method of claim 1 , wherein the performance metrics include elapsed time, disk Input/Outputs (I/Os), memory usage, and records accessed.

5. A non-transitory tangible computer readable storage medium having instructions for causing a computer to execute a method, the method comprising: generating query vectors from query plans, wherein the query vectors include a number of instances of each operator in the query plans; generating performance vectors from data collected while executing multiple queries in a database; using a machine learning technique (MLT) to compute distances between query vectors and between performance vectors; and using the MLT to predict performance of plural queries simultaneously executing in the database.

6. The tangible computer readable storage medium of claim 5 wherein said method further comprises: providing a compile-time feature vector for a new query input to the MLT and using the MLT to calculate nearest neighbors in both a query plan projection and a performance projection to predict performance for the new query.

7. The tangible computer readable storage medium of claim 5 wherein said method further comprises: computing at the MLT a query plan projection for a new query, and computing k nearest neighbors in the query plan projection, where k<5.

8. The tangible computer readable storage medium of claim 5 wherein said method further comprises: generating a graph showing predicted elapsed times for the plural queries versus actual elapsed times for the plural queries.

9. The tangible computer readable storage medium of claim 5 wherein said method further comprises: using the MLT to create a first characterization function for encoding workload characteristics into a workload characterization feature space; using the MLT to create a second characterization function for encoding performance characteristics into a performance feature space; given a point in the workload characterization feature space, finding a corresponding location in the performance feature space.

10. A computer system, comprising:

a database;

a memory encoded with code adapted for, when executed by a processor,

generating query vectors from query plans that include query operators and are associated with training queries and performance vectors from data generated while executing said training queries in a database, wherein the query vectors include a number of instances of each operator in the query plans; and

using a machine learning technique (MLT) to compute distances between the query vectors and between the performance vectors; and

using the MLT to predict performance of plural queries simultaneously executing in the database; and

said processor.

11. The computer system of claim 10 , wherein said code is configured to, when executed by said processor, use the MLT to predict performance characteristics for new queries.

12. The computer system of claim 10 , wherein said code is configured to, when executed by said processor, obtain performance results of running in isolation in the database each of said plural training queries.

13. The computer system of claim 10 , wherein said code is configured to, when executed by said processor, use the MLT to cluster queries with similar query vectors and cluster queries with similar performance vectors.

14. A process comprising:

generating a query plan from a current query, said query plan including operators;

generating a multi-element current query vector from said query plan, said multi-element current query vector including plural elements corresponding to respective ones of said operators, wherein the multi-element current query vector includes a number of instances of each operator in the query plan;

identifying a set of at least three neighboring multi-element prior-query vectors of said multi-element current query vector in a multi-dimensional query-vector space populated with multi-element prior-query vectors associated with respective prior queries; and

predicting a multi-element predicted-performance vector for said current query based on multi-element prior-performance vectors associated with said respective prior queries.

15. A system comprising non-transitory computer-readable storage media encoded with code configured to, when executed by a processor, implement a process including:

generating a query plan from a current query, said query plan including operators;

generating a multi-element current query vector from said query plan, said multi-element current query vector including plural elements corresponding to respective ones of said operators, wherein the multi-element current query vector includes a number of instances of each operator in the query plan;

identifying a set of at least three neighboring multi-element prior-query vectors of said multi-element current query vector in a multi-dimensional query-vector space populated with multi-element prior-query vectors associated with respective prior queries; and

predicting a multi-element predicted-performance vector for said current query based on multi-element prior-performance vectors associated with said respective prior queries.

16. A system as recited in claim 15 further comprising said processor.

Assignments (5)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 7, 2025
From: REGIONAL RESOURCES LIMITED
To: NETFLIX, INC.
Reel/Frame 069838/0271 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 13, 2022
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
To: REGIONAL RESOURCES LIMITED
Reel/Frame 059690/0697 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 28, 2021
From: GANAPATHI, ARCHANA SULOCHANA; KUNO, HARUMI ANNE; DAYAL, UMESHWAR
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 059907/0610 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2015
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 037079/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 29, 2009
From: GANAPATHI, ARCHANA SULOCHANA; KUNO, HARUMI ANNE; DAYAL, UMESHWAR
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 023019/0365 →
Continuity (2)
Provisional Application 61078381 · Jul 5, 2008
Related Publication 20100082602A1 · Apr 1, 2010