Improved table sorting performance