IP Library Granted Patent US 9,298,775
Granted Patent B2
US 9,298,775 · App. 14/604,737 · Granted Mar 29, 2016

Changing the compression level of query plans

Inventors: Rafal P. Konik (Oronoco, MN); Roger A. Mittelstadt (Byron, MN); Brian R. Muras (Otsego, MN); Mark W. Theuer (Rochester, MN)
Assignee: International Business Machines Corporation
G06F17/30501G06F17/3048G06F17/30289G06F17/30463G06F17/30483
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,298,775
App. No.
14/604,737
Granted
Mar 29, 2016
Kind
B2
Abstract

In an embodiment, a query plan is compressed to data in a cache at a high compression level if a runtime of a query that the query plan implements is greater than a high time threshold. The query plan is compressed to the data in the cache at a medium compression level if the runtime of the query that the query plan implements is less than the high time threshold and greater than a low time threshold. The query plan is stored to the data in the cache at an uncompressed level if the runtime of the query that the query plan implements is less than the low time threshold.

Claims (25)

1. A computer-implemented method, comprising:

generating a plurality of query plans, each plan for executing a respective query against data in a database;

with respect to each query plan of said plurality of query plans, selectively determining whether the respective query plan should be stored to data in a cache in a compressed form;

with respect to each query plan of said plurality of query plans for which it is selectively determined that the respective query plan should be stored to data in a cache in a compressed form, storing the query plan to data in the cache in a compressed form; and

with respect to each query plan of said plurality of query plans for which it is selectively determined that the respective query plan should not be stored to data in a cache in a compressed form, storing the query plan to data in the cache in an uncompressed form;

wherein said selectively determining whether the respective query plan should be stored to data in a cache in a compressed form comprises determining whether at least one parameter of characterization data exceeds at least one threshold.

2. The computer-implemented method of claim 1 , wherein the compressed form of the query plan data is produced by a lossless compression algorithm which is one of: a Lempel-Ziv (LZ) compression algorithm, a DEFLATE compression algorithm, or an LZR (LZ-Renau) compression algorithm.

3. A non-transitory computer-readable storage medium encoded with instructions, wherein the instructions when executed comprise:

generating a plurality of query plans, each plan for executing a respective query against data in a database;

with respect to each query plan of said plurality of query plans, selectively determining whether the respective query plan should be stored to data in a cache in a compressed form;

with respect to each query plan of said plurality of query plans for which it is selectively determined that the respective query plan should be stored to data in a cache in a compressed form, storing the query plan to data in the cache in a compressed form; and

with respect to each query plan of said plurality of query plans for which it is selectively determined that the respective query plan should not be stored to data in a cache in a compressed form, storing the query plan to data in the cache in an uncompressed form;

wherein the compressed form of the query plan data is produced by a lossless compression algorithm which is one of: a Lempel-Ziv (LZ) compression algorithm, a DEFLATE compression algorithm, or an LZR (LZ-Renau) compression algorithm.

4. The non-transitory computer-readable storage medium of claim 3 , wherein said selectively determining whether the respective query plan should be stored to data in a cache in a compressed form comprises determining whether at least one parameter of characterization data exceeds at least one threshold.

5. A computer system comprising:

a memory;

at least one processor communicatively connected to said memory, the at least one processor executing instructions storable in said memory;

at least one query plan cache storable in said memory;

processor-executable instructions storable in said memory for maintaining said at least one query plan cache, wherein when executed the processor-executable instructions perform:

with respect to each query plan of a plurality of query plans for executing respective queries against data in a database, selectively determining whether the respective query plan should be stored to data in a cache in a compressed form;

with respect to each query plan of said plurality of query plans for which it is selectively determined that the respective query plan should be stored to data in a cache in a compressed form, storing the query plan to data in the cache in a compressed form; and

with respect to each query plan of said plurality of query plans for which it is selectively determined that the respective query plan should not be stored to data in a cache in a compressed form, storing the query plan to data in the cache in an uncompressed form;

wherein said selectively determining whether the respective query plan should be stored to data in a cache in a compressed form comprises determining whether at least one parameter of characterization data exceeds at least one threshold.

6. The computer system of claim 5 , further comprising a database management system (DBMS) embodied as processor-executable instructions storable in said memory, wherein said processor-executable instructions for maintaining said at least one query plan cache are included in said DBMS.

7. The computer system of claim 5 , wherein the compressed form of the query plan data is produced by a lossless compression algorithm which is one of: a Lempel-Ziv (LZ) compression algorithm, a DEFLATE compression algorithm, or an LZR (LZ-Renau) compression algorithm.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 25, 2015
From: KONIK, RAFAL P.; MITTELSTADT, ROGER A.; MURAS, BRIAN R.; THEUER, MARK W.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 034806/0609 →
Continuity (2)
Continuation 13469317 · May 11, 2012
Related Publication 20150142762A1 · May 21, 2015