1. A computer program product comprising a non-transitory machine-readable storage medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising: determining whether a merge of a main partition of a table with a delta partition of the table should occur, the determining comprising comparing a calculated first cost function and a second cost function with calculations of other first and second cost functions for other merge requests of one or more other tables, the calculated first and second cost functions being associated with a request for the merge of the main partition of the table with the delta partition of the table; assigning, upon determining that the merge should occur, a merge thread to execute the merge; determining an availability of one or more merge tokens to assign to the merge thread, the one or more merge tokens representing system resources usable for merge operations; and commencing execution of the merge by the merge thread if at least one merge token is available or adding the merge thread to a merge queue to await an available merge token if the at least one merge token is not available.