Optimization for recombination of database files