Dynamically adjust duplicate skipping method for increased performance

US9928274B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9928274-B2
Application numberUS-201414557010-A
CountryUS
Kind codeB2
Filing dateDec 1, 2014
Priority dateJan 31, 2014
Publication dateMar 27, 2018
Grant dateMar 27, 2018

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Embodiments presented herein provide techniques for setting different methods of skipping duplicate values when executing a query statement in a relational database. A distance between a two distinct keys in an index, a current index key and a next distinct index key, are estimated. Based on the estimated distance, an appropriate duplicate-skipping method is determined. If the proximity between the distinct keys is relatively far apart (e.g., the keys reside in index pages that are at least an index page apart), then a “big skip” method is performed. Otherwise, if the proximity between the distinct keys is relatively near (e.g., the keys reside in the same index page), then a “little skip” method is performed.

First claim

Opening claim text (preview).

What is claimed is: 1. A computer-implemented method to dynamically adjust a granularity with which to skip duplicate index keys in a database index when identifying records in a database that satisfy a database query, the computer-implemented method comprising: estimating a first distance in the database index between a first index key and a next, distinct index key relative to the first index key upon determining that the estimated first distance satisfies a first criterion, identifying a second index key by operation of one or more computer processors and by performing a coarser duplicate-skipping operation comprising a binary search from a root of a tree of the database index, the second index key comprising the next, distinct index key relative to the first index key; estimating a second distance in the database index between the second index key and a next, distinct index key relative to the second index key; and upon determining that the estimated second distance satisfies a second criterion, identifying a third index key by performing a finer duplicate-skipping operation comprising a binary search within a leaf page where the second index key resides, the third index key comprising the next, distinct index key relative to the second index key. 2. The computer-implemented method of claim 1 , wherein the first criterion comprises the first index key and its next index key residing in index leaf pages that is at least one index page apart, wherein the second criterion comprises the second index key and its next index key residing in the same index leaf page. 3. The computer-implemented method of claim 1 , further comprising: performing a get-next operation in order to identify a fourth index key. 4. The computer-implemented method of claim 3 , further comprising: disabling at least one of the coarser duplicate-skipping operation and the finer duplicate-skipping operation when, while executing the database query, the get-next operation is performed consecutively for a specified amount of times. 5. The computer-implemented method of claim 1 , further comprising: inserting a database record corresponding to a given index key into a result set, wherein the given key is selected from the second and third index keys. 6. The computer-implemented method of claim 1 , wherein the granularity with which to skip duplicate index keys in the database index is dynamically adjusted in order to reduce a processing overhead associated with identifying the records in the database that satisfy the database query, wherein the computer-implemented method further comprises: estimating a third distance in the database index between the third index key and a next, distinct index key relative to the third index key; and upon determining that the estimated third distance satisfies a third criterion, identifying a fourth index key by performing a get-next operation, which does not skip any duplicates, the fourth index key comprising the next, distinct index key relative to the third index key, wherein the first, second, and third criteria are distinct. 7. The computer-implemented method of claim 6 , wherein estimating the first distance between the first index key and the next, distinct index key relative to the first index key comprises: generating a search index key, wherein the search index key is given the highest value in the database index of the first index key; and determining whether the first index key and the search index key are stored in the same index page. 8. The computer-implemented method of claim 7 , further comprising: for each of the second, third, and fourth index keys, inserting a database record corresponding to the respective index key into a result set; outputting the result set responsive to the database query; and upon determining that the get-next operation is performed consecutively for a predefined number of times, automatically disabling at least one operation, selected from the coarser duplicate-skipping operation and the finer duplicate-skipping operation, from being performed. 9. The computer-implemented method of claim 8 , wherein the coarser duplicate-skipping operation is used to skip duplicate index keys only upon determining that the estimated first distance satisfies the first criterion, the first criterion comprising a current index key and a next index key residing in index leaf pages at least one index page apart; wherein the finer duplicate-skipping operation is used to skip duplicate index keys only upon determining that the estimated second distance satisfies the second criterion, the second criterion comprising the current index key and the next index key residing in the same index leaf page. 10. The computer-implemented method of claim 9 , wherein the granularity with which to skip duplicate index keys in the database index is dynamically adjusted by a database management system for the database, wherein the coarser and finer duplicate-skipping operations and the get-next operation are performed by the database management system; wherein the get-next operation is used to avoid skipping any duplicate index keys, only upon determining that the estimated third distance satisfies the third criterion, the third criterion being satisfied only upon satisfaction of both: (i) the leaf index page having below a threshold count of index keys; and (ii) the current index key being located near a higher bound of the leaf index page. 11. The computer-implemented method of claim 1 , wherein the granularity with which to skip duplicate index keys in the database index is dynamically adjusted in order to reduce a processing overhead associated with identifying the records in the database that satisfy the database query. 12. The computer-implemented method of claim 1 , further comprising: estimating a third distance in the database index between the third index key and a next, distinct index key relative to the third index key. 13. The computer-implemented method of claim 12 , further comprising: upon determining that the estimated third distance satisfies a third criterion, identifying a fourth index key by performing a get-next operation, which does not skip any duplicates, the fourth index key comprising the next, distinct index key relative to the third index key. 14. The computer-implemented method of claim 1 , wherein estimating the first distance between the first index key and the next, distinct index key relative to the first index key comprises: generating a search index key, wherein the search index key is given the highest value in the database index of the first index key. 15. The computer-implemented method of claim 14 , wherein estimating the first distance between the first index key and the next, distinct index key relative to the first index key further comprises: determining whether the first index key and the search index key are stored in the same index page. 16. The computer-implemented method of claim 1 , further comprising: inserting a database record corresponding to a given index key into a result set, wherein the given key is selected from the second and third index keys. 17. The computer-implemented method of claim 1 , further comprising: for each of the second and third index keys, inserting a database record corresponding to the respective index key into a result set. 18. The computer-implemented method of claim 17 , further comprising: outputting the result set responsive to the database query. 19. The computer-implemented method of claim 1 , further comprising: upo

Assignees

Inventors

Classifications

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9928274B2 cover?
Embodiments presented herein provide techniques for setting different methods of skipping duplicate values when executing a query statement in a relational database. A distance between a two distinct keys in an index, a current index key and a next distinct index key, are estimated. Based on the estimated distance, an appropriate duplicate-skipping method is determined. If the proximity between…
Who is the assignee on this patent?
IBM
What technology area does this patent fall under?
Primary CPC classification G06F16/2453. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Mar 27 2018 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 4 related publications on this page (citations in our corpus or others sharing the same primary CPC).