Apparatus and method for using database knowledge to optimize a computer program
AssigneeInternational Business Machines Corporation
InventorsEric Barsness, Richard Dettinger, John Santosuosso
Life of this patent
Estimating the term…
Abstract
A code optimizer is used to optimize a computer program that references a database by reading database metadata and making suitable optimizations based on the metadata. By taking into account the metadata of a database referenced in the computer program, the optimizer may make suitable optimizations to the computer program. Such optimizations include, without limitation, removing unnecessary calls to the database, removing unnecessary loops, removing unnecessary database operations, providing compile-time errors, and replacing dynamic calls with static data.
Claims21
An apparatus comprising:
- at least one processor;
- a memory coupled to the at least one processor;
- a first instruction stream residing in the memory;
- and
- a code optimization mechanism residing in the memory and executed by the at least one processor, the code optimization mechanism reading an instruction in the first instruction stream that references a database having metadata, accessing the metadata of the database, and optimizing the first instruction stream to generate therefrom a second instruction stream according to the metadata of the database referenced in the first instruction stream.
A method for optimizing a first instruction stream comprising the steps of:
- (A) determining metadata of a database referenced in an instruction in the first instruction stream by querying the database;
- and
- (B) optimizing the first instruction stream to generate therefrom a second instruction stream according to the metadata.
A computer-readable program product comprising:
- (A) a code optimization mechanism that optimizes a first instruction stream to generate therefrom a second instruction stream according to metadata of a database referenced in the first instruction stream by reading an instruction in the first instruction stream that references the database, accessing the metadata of the database, and optimizing the first instruction stream to generate therefrom a second instruction stream according to the metadata of the database referenced in the first instruction stream;
- and
- (B) recordable media bearing the code optimization mechanism.
Dependencies are inferred from the claim text.