Patent ID: 7440960

Claim:
A method for result set management, comprising: receiving input from a system administrator of a number of result sets that are to be stored and a number of bucket tables that are to hold the result sets, wherein the number of result sets represents how many results sets are to be stored, and wherein the number of bucket tables represents how many bucket tables are to be stored in a database; initializing a result sets table of contents that includes a row for each existing result set, a bucket table column, and a set identifier that identifies a result set, wherein the bucket tables column identifies a bucket tables in which a result set is stored, wherein the result sets tables of contents comprises a table in the database that is separate from the bucket tables; storing one or more result sets in the bucket tables, wherein each result set was generated by executing a query; receiving input from the system administrator indicating changes to the number of result sets that are stored in the bucket tables and changes to the number of bucket tables that are stored in the database; and in response to receiving the input from the system administrator indicating changes, in response to determining that in input received from the system administrator indicates that the number of result sets has increased and the number of bucket tables has decreased, recalculating values in the bucket tables column of the result sets table of contents for existing set identifiers to determine which bucket table is to store which result set and to determine one or more bucket tables to be dropped, dropping one or more empty bucket tables, and inserting additional rows into the result sets table of contents for the increased number of result sets; and in response to determining that the input received from the system administrator indicates that the number of result sets has decreased and the number of bucket tables has increased, deleting rows in the result sets table of contents for existing set identifiers, recalculating values in the bucket table column of the result sets table of contents for remaining set identifiers to determine which bucket table is to store which result set, and creating one or more bucket tables.