IP Library › Granted Patent US 10,331,646
Granted Patent B2
US 10,331,646 · App. 15/150,758 · Granted Jun 25, 2019

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 10,331,646
App. No.
15/150,758
Granted
Jun 25, 2019
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 (27)

1. A method for optimizing query executions, the method comprising:

receiving, by one or more processors, a request to transfer data from a first table of a database to a second table of the database;

detecting, by one or more processors, 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;

identifying, by one or more processors, a first access path for transferring the data from the first table to the second table;

calculating, by one or more processors, 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;

identifying, by one or more processors, a second access path for transferring the data from the first table to the second table;

calculating, by one or more processors, 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;

determining, by one or more processors, that the second cost is less than the first cost; and

selecting, by one or more processors, the second access path to transfer the data from the first table to the second table.

2. The method of claim 1 , further comprising:

determining, by one or more processors, the first table provides an order corresponding to the second table;

calculating, by one or more processors, a first reduction based on the first table providing an order corresponding to the second table; and

adjusting, by one or more processors, the first cost by first reduction.

3. The method of claim 1 , further comprising:

determining, by one or more processors, the first table does not provide an order corresponding to the second table;

calculating, by one or more processors, 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

calculating, by one or more processors, a third cost, wherein the third cost is the first cost adjusted by the second factor.

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

matching, by one or more processors, a data structure of the first table to a data structure of the second table; and

comparing, by one or more processors, contents of the first table to contents the second table.

5. The method of claim 1 , further comprising:

determining, by one or more processors, that the first cost exceeds a predetermined threshold;

identifying, by one or more processors, a third access path for transferring the data from the first table to the second table, wherein the third access path is currently inaccessible;

calculating, by one or more processors, a third 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 third cost indicates estimated processor usage to transfer the data;

determining, by one or more processors, that the third cost is within the predetermined threshold;

monitoring, by one or more processors, the third access path to determine availability of the third access path; and

determining, by one or more processors, that the third access path is available.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 10, 2016
From: LI, SHUO; LIANG, PING; WEI, KEWEI; YANG, XIN YING
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 038534/0829 →
Continuity (2)
Continuation 14755608 · Jun 30, 2015
Related Publication 20170004174A1 · Jan 5, 2017