发明名称 INDEX SUSPENSION PRIOR TO DATABASE UPDATE
摘要 Embodiments of the present invention disclose a method, a computer program product, and a computer system for suspending and activating a database index. A computer determines a quantity of changes for a number of rows of a database that are to be made by an update of the database. The computer determines whether to suspend an index of the database based, at least in part, on a comparison between the quantity of changes and a pre-determined threshold value. The computer suspends the index of the database based on a result of the comparison that indicates the quantity of changes at least meet the pre-determined threshold value. A suspension of the index of the database initiates a rebuilding of the index.
申请公布号 US2016147781(A1) 申请公布日期 2016.05.26
申请号 US201615042501 申请日期 2016.02.12
申请人 International Business Machines Corporation 发明人 Bender Michael;Delia Wayne M.
分类号 G06F17/30 主分类号 G06F17/30
代理机构 代理人
主权项 1. A method for suspending and activating a database index, the method comprising: determining, by a computer, a quantity of changes for a number of rows of a database that are to be made by an update of the database by: receiving, by the computer, a request that includes a plurality of updates to be performed to the database, and a selection to perform an analysis of the plurality of updates, wherein results of the analysis indicate whether to suspend the index of the database;determining, by the computer, a count of updates for the database from the plurality of updates to be performed to the database, by: determining, by the computer, an initial number of rows of data in the database;determining, by the computer, a percentage of updates for the database by dividing the count of updates for the database by the initial number of rows of data in the database; anddetermining, by the computer, the quantity of changes based, at least in part, on i) the received plurality of updates, ii) the count of updates for the database, and iii) the percentage of updates for the database, wherein the count of updates for the database is a numerical value based, at least in part, on a number of rows of data from an input file;receiving, by the computer, a temporal limit, wherein the temporal limit dictates when the computer performs the analysis of the plurality of updates; andperforming, by the computer, the analysis of the plurality of updates prior to performing the plurality of updates to the database in response to meeting the temporal limit; determining, by the computer, whether to suspend an index of the database based, at least in part, on a comparison between the quantity of changes and a pre-determined threshold value; suspending, by the computer, the index of the database based, at least in part, on a result of the comparison that indicates the quantity of changes at least meet the pre-determined threshold value, wherein a suspension of the index of the database initiates a rebuilding of the index; retaining, by the computer, a definition for the index of the database, wherein the definition includes a command for rebuilding the index of the database; deleting, by the computer, the index of the database; and rebuilding, by the computer, the index of the database using the definition, in response to a completion of a plurality of updates to the database.
地址 Armonk NY US