发明名称 Obtaining partial results from a database query
摘要 A database query governor determines when a query cannot be executed within a defined time threshold, but still executes the query or some variant of the query so partial results for the query may be returned to the user after executing for less than the defined time threshold, instead of an error message indicating the query was not executed at all. The partial results provide information to the user that may be sufficient for some applications, or may indicate to the user how the query could be modified to run in less time.
申请公布号 US9189524(B2) 申请公布日期 2015.11.17
申请号 US201414277910 申请日期 2014.05.15
申请人 International Business Machines Corporation 发明人 Barsness Eric L.;Santosuosso John M.
分类号 G06F17/30 主分类号 G06F17/30
代理机构 Martin & Associates, LLC 代理人 Martin & Associates, LLC ;Martin Derek P.
主权项 1. An apparatus comprising: at least one processor; a memory coupled to the at least one processor; a plurality of queries to a database; and a query governor that performs the steps of: determining a first of the plurality of queries cannot be executed in less time than a specified threshold value; in response to determining the first query cannot be executed in less time than the specified threshold value, performing the steps of: executing an access plan for the first query for a period of time less than the specified threshold value;halting execution of the access plan; andreturning the partial results for the first query; determining a second of the plurality of queries cannot be executed in less time than the specified threshold value; in response to determining the second query cannot be executed in less time than the specified threshold value, performing the steps of: executing a first access plan for the second query for a first period of time;executing a second access plan for the second query for a second period of time, wherein the first period of time added to the second period of time is less than the specified threshold value; andreturning query results from executing the first access plan and the second access plan as the partial results for the second query; determining a third of the plurality of queries cannot be executed in less time than the specified threshold value; in response to determining the third query cannot be executed in less time than the specified threshold value, performing the steps of: simultaneously executing first and second access plans for the third query; andreturning results of executing the first and second access plans as the partial results for the third query; determining a fourth of the plurality of queries cannot be executed in less time than the specified threshold value; in response to determining the fourth query cannot be executed in less time than the specified threshold value, performing the steps of: modifying the fourth query to omit at least one portion of the fourth query;executing the modified fourth query; andreturning results of executing the modified fourth query as the partial results for the query.
地址 Armonk NY US