发明名称 Database query optimization using index carryover to subset an index
摘要 A method, apparatus and program product use a first index associated with a field in a database table to identify a range of records in the database table that includes instances of a first key value in the field and use the identified range of records to subset a second index associated with another field in a database table. The database query identifies the first key value for the field in the database table and the second key value for the other field in the database table. By doing so, information from an index may be carried over and applied to another index to subset the other index, often reducing the quantity of entries that are searched in the other index and improving performance.
申请公布号 US8745033(B2) 申请公布日期 2014.06.03
申请号 US201313779196 申请日期 2013.02.27
申请人 International Business Machines Corporation 发明人 Day Paul R.;Egan Randy L.;Mittelstadt Roger A.
分类号 G06F17/30;G06F15/16 主分类号 G06F17/30
代理机构 代理人
主权项 1. A method for processing a database query, wherein the database query identifies a first key value for a field in a database table and a second key value for another field in the database table, the method comprising: using a first index associated with the field in the database table to identify a range of records in the database table that includes instances of the first key value in the field, wherein the first index associated with the field in the database table identifies a first record in the database table including an instance of the first key value in the field and a last record in the database table including an instance of the first key value in the field, and wherein using the first index to identify the range of records uses the first and last records identified by the first index; creating a range predicate from the identified range of records; prior to executing the database query, optimizing the database query by adding the range predicate to the database query; and using the identified range of records to subset a second index associated with the other field in the database table by subsetting the second index with the range predicate, wherein the first and second indexes are built over different fields of the same database table, and wherein the field and the other field are identified in the database query.
地址 Armonk NY US