System and method for executing a large object fetch query against a database
AssigneeInternational Business Machines Corporation
InventorsCurt L. Cotner, Robert A. Begg, Brent P. Gross, Paul A. Ostler, Timothy J. Vincent
Life of this patent
Estimating the term…
Abstract
A database server helps to streamline the retrieval of LOB values by deciding to send a locator in replacement of the LOB value, or the LOB value itself, depending upon the specific LOB value being retrieved. A threshold value is determined in a fetch query, and the LOB sizes below that threshold are sent as values in a corresponding fetch response, and the lengths above are sent as locators in the fetch response. Indicators are inserted in a fetch parameter of the response to inform the receiving client the form of retrieval that was used for each requested LOB value being returned.
Claims30
A method for directing a database management system to execute a fetch query, comprising:
- receiving the fetch query that contains at least one large object fetch request and a predefined threshold parameter associated with the large object fetch request;
- accessing a selected large object value that corresponds to the large object fetch request of the fetch query;
- comparing the selected large object value with the predefined threshold value;
- returning a fetch response that corresponds to the large object fetch request according to a return operation from a pair of return operations;
- and
- wherein the pair of return operations comprises:
- a first return operation that returns the selected large object value in the large object fetch response, if the large object value is less than the predefined threshold value;
- and
- a second return operation that returns a large object locator that is associated with the large object value in the large object fetch response, if the large object value is greater than the predefined threshold value.
A computer program product having instruction codes for directing a database management system to execute a fetch query, comprising:
- a first set of instruction codes for receiving the fetch query that contains at least one large object fetch request and a predefined threshold parameter associated with the large object fetch request;
- a second set of instruction codes for accessing a selected large object value that corresponds to the large object fetch request of the fetch query;
- a third set of instruction codes for comparing the selected large object value with the predefined threshold value;
- a fourth set of instruction codes for returning a fetch response that corresponds to the large object fetch request according to a return operation from a pair of return operations;
- and
- wherein the pair of return operations comprises:
- a first return operation that returns the selected large object value in the large object fetch response, if the large object value is less than the predefined threshold value;
- and
- a second return operation that returns a large object locator that is associated with the large object value in the large object fetch response, if the large object value is greater than the predefined threshold value.
A system for directing a database management system to execute a fetch query, comprising:
- means for receiving the fetch query that contains at least one large object fetch request and a predefined threshold parameter associated with the large object fetch request;
- means for accessing a selected large object value that corresponds to the large object fetch request of the fetch query;
- means for comparing the selected large object value with the predefined threshold value;
- means for returning a fetch response that corresponds to the large object fetch request according to a return operation from a pair of return operations;
- and
- wherein the pair of return operations comprises:
- a first return operation that returns the selected large object value in the large object fetch response, if the large object value is less than the predefined threshold value;
- and
- a second return operation that returns a large object locator that is associated with the large object value in the large object fetch response, if the large object value is greater than the predefined threshold value.
Dependencies are inferred from the claim text.