← Back to Patent Explorer
US5758146A Expired / Lapsed US ⏱️ 0.0 years remaining

Method and apparatus for optimizing data retrieval using index scanning

Assignee: International Business Machines Corp
•
Filing: 1995-05-12
•
Granted: 1998-05-26
•
Expires: 2015-05-12
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract Described herein is a system and method for operating a data processing system having a processing unit and physical storage in which data is stored. The storage is connected to the processing unit for transferring pages of data to the processing unit. The storage contains at least one database table stored on a plurality of pages. Each data base table has a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference the rows. The processing unit has a memory associated with it. A portion of the memory comprises a buffer pool for caching data pages from the table. The method operates by scanning one or more selected indexes in determining the relationship of the number of data transfers required to traverse all or a portion of each selected index for a selected range of buffer pool sizes. Then, a description of this relationship is stored.

Inventors

  • 👤 Bernhard Schiefer
  • 👤 Arun Narasimha Swami

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-06 12:54
CPC Classifications
G; G06; G06F; G06F16/00; G06F16/20; G06F16/22; G06F16/2228; Y; Y10; Y10S; Y10S707/00; Y10S707/99931; Y10S707/99932; Y10S707/99933

Claims Analysis

Total Claims: 21
Claim 1
Independent Claim 175 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) scanning one or more selected indexes and determining the relationship between the number of data transfers required to traverse all or a portion of each selected index and a selected range of buffer pool sizes; (b) storing a description of said relationship; and (c) selecting an index to be used for a database query based on said description.
Claim 2
Independent Claim 175 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) scanning one or more selected indexes and determining the relationship between the number of data transfers required to traverse all or a portion of each selected index and a selected range of buffer pool sizes; (b) storing a description of said relationship; and (c) selecting an index to be used for a database query based on said description.
Claim 3
Independent Claim 373 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) scanning one or more selected indexes and determining the relationship between the number of data transfers required to traverse all or a portion of each selected index and a selected range of buffer pool sizes, and storing a description of said relationship; (b) for a query submitted by a data base user determining the number of page transfers required to scan a whole table of interest, and; (c) for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query, as determined from said relationship; (2) scaling down the number of page transfers required in proportion to a selectivity factor of any starting and stopping conditions present in search criteria in said query; (3) applying a suitable correction factor to said number of page transfers if any of the following conditions are found: (i) very few rows of data remain to be transferred after applying said search criteria; (ii) said buffer pool to table size ratio is large, or; (iii) an index being used has a low degree of clustering (4) accounting for the effect on said number of page transfers by any remaining index sargable search criteria; (5) comparing the number of page transfers required for scanning of said relevant indexes and for scanning said entire table; and (6) selecting a search procedure from among said index scanning or table scanning that results in the least number of page transfers.
Claim 4
Independent Claim 373 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) scanning one or more selected indexes and determining the relationship between the number of data transfers required to traverse all or a portion of each selected index and a selected range of buffer pool sizes, and storing a description of said relationship; (b) for a query submitted by a data base user determining the number of page transfers required to scan a whole table of interest, and; (c) for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query, as determined from said relationship; (2) scaling down the number of page transfers required in proportion to a selectivity factor of any starting and stopping conditions present in search criteria in said query; (3) applying a suitable correction factor to said number of page transfers if any of the following conditions are found: (i) very few rows of data remain to be transferred after applying said search criteria; (ii) said buffer pool to table size ratio is large, or; (iii) an index being used has a low degree of clustering (4) accounting for the effect on said number of page transfers by any remaining index sargable search criteria; (5) comparing the number of page transfers required for scanning of said relevant indexes and for scanning said entire table; and (6) selecting a search procedure from among said index scanning or table scanning that results in the least number of page transfers.
Claim 5
Dependent Claim 15 words
The method of claim 2 further including performing a search with said selected search procedure.
Claim 6
Dependent Claim 64 words
The method of claim 2 wherein said relationship between the number of page transfers and the range of sizes of the buffer pool is modelled by line segment fitting; determining the number of page transfers required to scan said selected index by interpolating values of the relationship between the endpoints of the line segment which straddles the selected buffer pool size for the query.
Claim 7
Dependent Claim 29 words
The method of claim 2 wherein said relationship between the number of page transfers and the range of sizes of the buffer pool is modelled by a polynomial equation.
Claim 8
Independent Claim 317 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, (a) for a query submitted by a data base user determining the number of page transfers required to scan a whole table of interest, and; (b) for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query; (2) scaling down the number of page transfers required in proportion to a selectivity factor of any starting and stopping conditions present in search criteria in said query; (3) applying a suitable correction factor to said number of page transfers if any of the following conditions are found: (i) very few rows of data remain to be transferred after applying said search criteria; (ii) said buffer pool to table size ratio is large, or; (iii) an index being used has a low degree of clustering (4) accounting for the effect on said number of page transfers by any remaining search criteria including index sargable search criteria; (5) comparing the number of page transfers required for scanning of said relevant indexes and for scanning said entire table; and (6) selecting a search procedure from among said index scanning or table scanning that results in the least number of page transfers.
Claim 9
Independent Claim 317 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, (a) for a query submitted by a data base user determining the number of page transfers required to scan a whole table of interest, and; (b) for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query; (2) scaling down the number of page transfers required in proportion to a selectivity factor of any starting and stopping conditions present in search criteria in said query; (3) applying a suitable correction factor to said number of page transfers if any of the following conditions are found: (i) very few rows of data remain to be transferred after applying said search criteria; (ii) said buffer pool to table size ratio is large, or; (iii) an index being used has a low degree of clustering (4) accounting for the effect on said number of page transfers by any remaining search criteria including index sargable search criteria; (5) comparing the number of page transfers required for scanning of said relevant indexes and for scanning said entire table; and (6) selecting a search procedure from among said index scanning or table scanning that results in the least number of page transfers.
Claim 10
Independent Claim 222 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) for a query submitted by a data base user determining the number of page transfers required to scan a whole table of interest, and; (b) for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query; (2) comparing the number of page transfers required for scanning of said relevant indexes and for scanning said entire table; and (3) selecting a search procedure from among said index scanning or table scanning that results in the least number of page transfers.
Claim 11
Independent Claim 222 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and one or more indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) for a query submitted by a data base user determining the number of page transfers required to scan a whole table of interest, and; (b) for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query; (2) comparing the number of page transfers required for scanning of said relevant indexes and for scanning said entire table; and (3) selecting a search procedure from among said index scanning or table scanning that results in the least number of page transfers.
Claim 12
Independent Claim 269 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and a plurality of indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) scanning one or more selected indexes and determining the relationship between the number of data transfers required to traverse all or a portion of each selected index and a selected range of buffer pool sizes; and storing a description of said relationship; (b) for a query submitted to said data base determining the number of page transfers required to scan a whole table of interest, and; (c) for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query, as determined from said relationship; (2) comparing the number of page transfers required for scanning of said relevant indexes and for scanning said entire table; and (3) selecting a search procedure from among said index scanning or table scanning that results in the least number of page transfers.
Claim 13
Independent Claim 269 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and a plurality of indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) scanning one or more selected indexes and determining the relationship between the number of data transfers required to traverse all or a portion of each selected index and a selected range of buffer pool sizes; and storing a description of said relationship; (b) for a query submitted to said data base determining the number of page transfers required to scan a whole table of interest, and; (c) for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query, as determined from said relationship; (2) comparing the number of page transfers required for scanning of said relevant indexes and for scanning said entire table; and (3) selecting a search procedure from among said index scanning or table scanning that results in the least number of page transfers.
Claim 14
Dependent Claim 48 words
The method of claim 8 further including for a submitted query before comparing the number of page transfers required the step of scaling down the number of page transfers required in proportion to the selectivity of any starting and stopping conditions present in search criteria in said query.
Claim 15
Dependent Claim 75 words
The method of claim 9 further including for a submitted query before comparing the number of page transfers required the step of applying a suitable correction factor to said number of page transfers if any of the following conditions are found: very few rows of data remain to be transferred after applying said search criteria; said buffer pool to table size ratio is large, or; an index being used has a low degree of clustering.
Claim 16
Dependent Claim 39 words
The method of claim 10 further including for a submitted query before comparing the number of page transfers required, the step of accounting for the effect on said number of page transfers by any remaining index sargable search criteria.
Claim 17
Independent Claim 245 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and a plurality of indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) scanning one or more selected indexes and determining the relationship between the number of data transfers required to traverse all or a portion of each selected index and a selected range of buffer pool sizes; and storing a description of said relationship; and (b) for a query submitted to said data base, for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query, as determined from said relationship; (2) comparing the number of page transfers required for scanning of said relevant indexes; and (3) selecting a search procedure from among said index scanning that results in the least number of page transfers.
Claim 18
Independent Claim 245 words
A method for operating a data processing system having a processing unit and physical storage in which data is stored, said storage being operably connected to said processing unit for transferring pages of data to said processing unit, said storage containing at least one data base table stored on a plurality of pages, each said data base table having a plurality of rows of data, and a plurality of indexes composed of a sequence of entries which reference said rows, said processing unit having a memory associated with it, a portion of said memory comprising a buffer pool for caching data pages from said table, the method comprising the steps performed by said processing unit of: (a) scanning one or more selected indexes and determining the relationship between the number of data transfers required to traverse all or a portion of each selected index and a selected range of buffer pool sizes; and storing a description of said relationship; and (b) for a query submitted to said data base, for each index of said table relevant to said query: (1) determining the number of page transfers required to scan each said relevant index in accordance with the size of buffer pool made available for said query, as determined from said relationship; (2) comparing the number of page transfers required for scanning of said relevant indexes; and (3) selecting a search procedure from among said index scanning that results in the least number of page transfers.
Claim 19
Dependent Claim 48 words
The method of claim 11 further including for a submitted query before comparing the number of page transfers required the step of scaling down the number of page transfers required in proportion to the selectivity of any starting and stopping conditions present in search criteria in said query.
Claim 20
Dependent Claim 75 words
The method of claim 13 further including for a submitted query before comparing the number of page transfers required, the step of applying a suitable correction factor to said number of page transfers if any of the following conditions are found: very few rows of data remain to be transferred after applying said search criteria; said buffer pool to table size ratio is large, or; an index being used has a low degree of clustering.
Claim 21
Dependent Claim 39 words
The method of claim 14 further including for a submitted query before comparing the number of page transfers required, the steps of accounting for the effect on said number of page transfers by any remaining index sargable search criteria.

References Cited (Backward Citations)

US3568155A Cited
US3623018A Cited
US4829427A Cited
US4769772A Cited
US4774657A Cited
US5091852A Cited
US5043872A Cited
US5379424A Cited
US5301317A Cited
US5404510A Cited
US5548770A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2001-05-25 2001-11-24 2002-05-26 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2005-05-25 2005-11-24 2006-05-26 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2009-05-25 2009-11-24 2010-05-26 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag