IP Library Granted Patent US 12,229,095
Granted Patent B2
US 12,229,095 · App. 18/091,570 · Granted Feb 18, 2025

Hybrid query and index for high performance in a cloud

Inventors: Sheng Yan Sun (Beijing, CN); Peng Hui Jiang (Beijing, CN); Xiao Xiao Chen (Beijing, CN); Ying Zhang (Beijing, CN)
Assignee: International Business Machines Corporation
G06F16/22G06F16/2425G06F16/24578G06F18/2323
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 12,229,095
App. No.
18/091,570
Granted
Feb 18, 2025
Kind
B2
Abstract

A computer-implemented method, including receiving, by a processor set, a query including a query string for a system catalog; identifying, by the processor set, a default index structure of the system catalog; executing, by the processor set, the query based on the default index structure of each index in the system catalog; ranking, by the processor set, a performance of each execution of the query by each index; mapping, by the processor set, a query pattern to a corresponding index of the system catalog; selecting, by the processor set, the index to perform the query using a machine learning (ML) model trained with a knowledge base that includes the ranking and the mapping; executing, by the processor set, the query on the selected index; and in response to executing the query on the selected index, returning, by the processor set, a result of the query.

Claims (85)

1. A computer-implemented method, comprising:

receiving, by a processor set, a query including a query string for a system catalog;

identifying, by the processor set, a default index structure of the system catalog;

executing, by the processor set, the query based on the default index structure of each index in the system catalog;

ranking, by the processor set, a performance of each execution of the query by each index;

mapping, by the processor set, a query pattern to a corresponding index of the system catalog;

selecting, by the processor set, the index to perform the query using a machine learning (ML) model trained with a knowledge base that includes the ranking and the mapping;

executing, by the processor set, the query on the selected index;

in response to executing the query on the selected index, returning, by the processor set, a result of the query; and

receiving, by the processor set, a new query;

analyzing, by the processor set, the new query to determine a new query pattern; and

building, by, the processor set, a new invisible index based on the determined new query pattern and determining whether the new invisible index performs better than the system catalog.

2. The method of claim 1 , further comprising:

determining the query string includes a specified index; and

monitoring the specified index for activity.

3. The method of claim 1 , further comprising:

normalizing a plurality of query statements of the query string to the query pattern, wherein the new invisible index is further based on the query pattern;

determining that the new invisible index has a highest performance for the system catalog; and

changing the new invisible index to be a visible index in response to determining that the new invisible index has the highest performance for the system catalog.

4. The method of claim 3 , wherein the determining that the new invisible index has the highest performance for the system catalog further comprises performance benchmarking of the new invisible index and each index in the system catalog and comparing performances of the new invisible index for the new query pattern and each index for each query pattern in the system catalog.

5. The method of claim 1 , further comprising:

determining the query pattern specified by the query string based on a query structure and statistics of the knowledge base;

identifying a target index based on the query string;

converting the query pattern to work with a plurality of index types; and

determining the performance of the query pattern for each of the index types.

6. The method of claim 5 , further comprising training of the ML model by

detecting a relationship between the statistics and the query pattern.

7. The method of claim 6 , wherein the ML model is a clustering ML model.

8. The method of claim 1 , wherein the knowledge base includes historical query performance.

9. The method of claim 1 , wherein the statistics include a usage frequency, a performance benchmark, and a recommended ratio of the query pattern.

10. The method of claim 1 , further comprising:

matching the query pattern with another query pattern of another received query; and

selecting, based on the matched query pattern, another index of the system catalog to execute the another received query.

11. A computer program product comprising one or more computer readable storage media having program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to:

receive a query including a query string for a system catalog;

determine the query string includes a specified index;

monitor the specified index for activity;

identify a default index structure of the system catalog based on the activity;

execute the query based on the default index structure of each index in the system catalog;

rank a performance of each execution of the query by each index;

map a query pattern to a corresponding index of the system catalog;

select the index to perform the query using a machine learning (ML) model trained with a knowledge base that includes the ranking and the mapping;

execute the query on the selected index;

in response to the execution of the query on the selected index, return a result of the query;

receive a new query;

analyze the new query to determine a new query pattern; and

build a new invisible index based on the determined new query pattern and determining whether the new invisible index performs better than the system catalog.

12. The computer program product of claim 11 , further comprising the program instructions to:

normalize a plurality of query statements of the query string to a query pattern, wherein the new invisible index is further based on the query pattern;

determine that the new invisible index has a highest performance for the system catalog; and

change the new invisible index to be a visible index in response to determining that the new invisible index has the highest performance for the system catalog.

13. The computer program product of claim 12 , wherein the determining that the new invisible index has the highest performance for the system catalog further comprises performance benchmarking of the new invisible index and each index in the system catalog and comparing performances of the new invisible index for the new query pattern and each index for each query pattern in the system catalog.

14. The computer program product of claim 11 , further comprising the program instructions to:

determine the query pattern specified by the query string based on a query structure and statistics of the knowledge base;

identify a target index based on the query string;

convert the query pattern to work with a plurality of index types; and

determine the performance of the query pattern for each of the index types.

15. The computer program product of claim 14 , further comprising the program instructions to:

detect a relationship between the statistics and the query pattern.

16. The computer program product of claim 15 , wherein the ML model is a clustering ML model.

17. The computer program product of claim 11 , wherein the knowledge base includes historical query performance.

18. The computer program product of claim 11 , wherein the statistics include a usage frequency, a performance benchmark, and a recommended ratio of the query pattern.

19. A system comprising:

a processor set, one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to:

receive a query including a query string for a system catalog;

determine the query string includes a specified index;

monitor the specified index for activity;

identify a default index structure of the system catalog based on the activity;

execute the query on each index in the system catalog;

rank a performance of each execution of the query by each index;

map a query pattern to a corresponding index of the system catalog;

select the index to perform the query using a machine learning (ML) model trained with a knowledge base that includes the ranking and the mapping;

execute the query on the selected index;

in response to the execution of the query on the selected index, return a result of the query;

receive a new query;

analyze the new query to determine a new query pattern; and

build a new invisible index based on the determined new query pattern and determining whether the new invisible index performs better than the system catalog.

20. The system of claim 19 , further comprising the program instructions to:

determine the query pattern specified by the query string based on a query structure and statistics of the knowledge base;

identify a target index based on the query string;

convert the query pattern to work with a plurality of index types;

determine the performance of the query pattern for each of the index types;

determine that the new invisible index has a highest performance for the system catalog; and

change the new invisible index to be a visible index in response to determining that the new invisible index has the highest performance for the system catalog,

wherein the determining that the new invisible index has the highest performance for the system catalog further comprises performance benchmarking of the new invisible index and each index in the system catalog and comparing performances of the new invisible index for the new query pattern and each index for each query pattern in the system catalog.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 30, 2022
From: SUN, SHENG YAN; JIANG, PENG HUI; CHEN, XIAO XIAO; ZHANG, YING
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 062243/0925 →
Continuity (1)
Related Publication 20240220465A1 · Jul 4, 2024
References Cited (20)
US 9098584B1 · Fredinburg · 2015 [cited by examiner]
US 11068460B2 · Zait · 2021 [cited by examiner]
US 11321329B1 · Shih · 2022 [cited by examiner]
US 11580126B1 · Sultania · 2023 [cited by examiner]
US 11836146B1 · Pathak · 2023 [cited by examiner]
US 20100257151A1 · Lohman · 2010 [cited by examiner]
US 20150227561A1 · Bender · 2015 [cited by examiner]
US 20160196349A1 · Berkhin · 2016 [cited by examiner]
US 20170116253A1 · Eadon · 2017 [cited by examiner]
US 20170163611A1 · Cooley · 2017 [cited by applicant]
US 20180314744A1 · Mathew · 2018 [cited by applicant]
US 20190012381A1 · Debique · 2019 [cited by examiner]
US 20190197175A1 · Purcell · 2019 [cited by examiner]
US 20190251195A1 · Purcell · 2019 [cited by examiner]
US 20200327134A1 · Freed · 2020 [cited by examiner]
US 20210157845A1 · Dodel · 2021 [cited by examiner]
US 20230016157A1 · Ferreira Moreno · 2023 [cited by examiner]
US 20240220465A1 · Sun · 2024 [cited by examiner]
CN 113407801 · 2021 [cited by applicant]
WO 2022140020 · 2022 [cited by applicant]