IP Library › Granted Patent US 11,163,743
Granted Patent B2
US 11,163,743 · App. 16/406,049 · Granted Nov 2, 2021

Enhancements for optimizing query executions

Inventors: Shuo Li (Beijing, CN); Ping Liang (Beijing, CN); Kewei Wei (Beijing, CN); Xin Ying Yang (Beijing, CN)
Assignee: International Business Machines Corporation
G06F16/2282G06F16/24542G06F16/24549G06F16/24558G06F16/288
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,163,743
App. No.
16/406,049
Granted
Nov 2, 2021
Kind
B2
Abstract

In an approach for optimizing query executions a processor receives a request to transfer data from a first table to a second table. A processor detects a relationship between the first table and the second table, wherein the relationship is based on a similarity between the first table and the second table. A processor identifies at least a first access path for transferring the data from the first table to the second table. A processor calculates a first cost of transferring the data from the first table to the second table using the first access path based on the similarity between the first table and the second table, wherein the first cost indicates estimated processor usage to transfer the data.

Claims (44)

1. A computer program product for optimizing query executions, the computer program product comprising:

one or more computer readable hardware storage media and program instructions stored on the one or more computer readable hardware storage media, the program instructions comprising:

program instructions to receive a request to transfer data from a first table to a second table;

program instructions to detect a relationship between the first table and the second table, wherein the relationship is based on a similarity between the first table and the second table;

program instructions to identify at least a first access path for transferring the data from the first table to the second table;

program instructions to calculate a first cost of transferring the data from the first table to the second table using the first access path based on the similarity between the first table and the second table, wherein the first cost indicates estimated processor usage to transfer the data; and

program instructions to select the first access path to transfer the data from the first table to the second table.

2. The computer program product of claim 1 , further comprising:

program instructions to determine the first table provides an order corresponding to the second table;

program instructions to calculate a first reduction based on the first table providing an order corresponding to the second table; and

program instructions to adjust the first cost by first reduction.

3. The computer program product of claim 1 , further comprising:

program instructions to determine the first table does not provide an order corresponding to the second table;

program instructions to calculate a factor, based on the similarity between the first table and the second table and the determination that the first table does not provide an order corresponding to the second table, wherein the factor indicates a cost to reorganize the first table such that the data can be transferred to the second table; and

program instructions to calculate a second cost, wherein the second cost is the first cost adjusted by the second factor.

4. The computer program product of claim 1 , wherein detecting the relationship between the first table and the second table, further comprises:

program instructions to match a data structure of the first table to a data structure of the second table; and

program instructions to compare contents of the first table to contents the second table.

5. The computer program product of claim 1 , further comprising:

program instructions to determine that the first cost exceeds a predetermined threshold;

program instructions to identify a second access path for transferring the data from the first table to the second table, wherein the second access path is currently inaccessible;

program instructions to calculate a second cost of transferring the data from the first table to the second table using the second access path based on the similarity between the first table and the second table, wherein the second cost indicates estimated processor usage to transfer the data;

program instructions to determine that the second cost is within the predetermined threshold;

program instructions to monitor the second access path to determine availability of the second access path;

program instructions to determine that the second access path is available; and

responsive to determining that the second access path is available, program instructions to select the second access path to transfer the data from the first table to the second table.

6. A computer system for optimizing query executions, the computer program product comprising:

one or more computer processors, one or more computer readable hardware storage media, and program instructions stored on the one or more computer readable hardware storage media for execution by, at least one of the one or more computer processors, the program instructions comprising:

program instructions to receive a request to transfer data from a first table to a second table;

program instructions to detect a relationship between the first table and the second table, wherein the relationship is based on a similarity between the first table and the second table;

program instructions to identify at least a first access path for transferring the data from the first table to the second table;

program instructions to calculate a first cost of transferring the data from the first table to the second table using the first access path based on the similarity between the first table and the second table, wherein the first cost indicates estimated processor usage to transfer the data; and

program instructions to select the first access path to transfer the data from the first table to the second table.

7. The computer system of claim 6 , further comprising:

program instructions, stored on the computer readable hardware storage media for execution by at least one of the one or more computer processors, to determine the first table provides an order corresponding to the second table;

program instructions, stored on the computer readable hardware storage media for execution by at least one of the one or more computer processors, to calculate a first reduction based on the first table providing an order corresponding to the second table; and

program instructions, stored on the computer readable hardware storage media for execution by at least one of the one or more processors, to adjust the first cost by first reduction.

8. The computer system of claim 6 , further comprising:

program instructions, stored on the computer readable hardware storage media for execution by at least one of the one or more computer processors, to determine the first table does not provide an order corresponding to the second table;

program instructions, stored on the computer readable hardware storage media for execution by at least one of the one or more computer processors, to calculate a factor, based on the similarity between the first table and the second table and the determination that the first table does not provide an order corresponding to the second table, wherein the factor indicates a cost to reorganize the first table such that the data can be transferred to the second table; and

program instructions, stored on the computer readable hardware storage media for execution by at least one of the one or more computer processors, to calculate a second cost, wherein the second cost is the first cost adjusted by the second factor.

9. The computer system of claim 6 , wherein detecting the relationship between the first table and the second table, further comprises:

program instructions, stored on the computer readable hardware storage media for execution by at least one of the one or more computer processors, to match a data structure of the first table to a data structure of the second table; and

program instructions, stored on the computer readable hardware storage media for execution by at least one of the one or more computer processors, to compare contents of the first table to contents the second table.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 8, 2019
From: LI, SHUO; LIANG, PING; WEI, KEWEI; YANG, XIN YING
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 049108/0628 →
Continuity (3)
Continuation 15150758 · May 10, 2016
Continuation 14755608 · Jun 30, 2015
Related Publication 20190294601A1 · Sep 26, 2019