Patent ID: 7698272

Claim:
A computer program product comprising a computer useable medium having a computer readable program for allocating disk space in support of parallel sorting operations in a database management system (DBMS), the operations of the computer program product comprising: computing a file size of a plurality of sort operation data sources participating in a parallel sorting operation; allocating sort files for each sort operation data source participating in the parallel sorting operation prior to determining a maximum supported degree of parallelism for the parallel sorting operation, the allocation of sort files further comprising: determining for each sort operation data source a minimum number of sort files necessary for storing the sort operation data source data for each sort operation, each sort operation comprising at least two sort files; determining the maximum supported degree of parallelism for executing the parallel sort operation, determining the maximum degree of parallelism further comprising: in response to an amount of virtual storage needed to execute the parallel sort operation for a given degree of parallelism being less than or equal to a maximum available virtual storage, setting the maximum degree of parallelism as the given degree of parallelism; while the amount of virtual storage needed to execute the parallel sort operation for the given degree of parallelism is greater than the maximum available virtual storage, collapsing a smallest sort operation with a next-smallest sort operation, reducing the given degree of parallelism by one, and setting the reduced degree of parallelism as the maximum degree of parallelism, wherein collapsing a smallest sort operation with a next-smallest sort operation comprises allocating additional sort files to the smallest sort operation such that the smallest sort operation's record length is equal in size to the next-smallest sort operation's record length; and executing the parallel sorting operation using the maximum supported degree of parallelism.