Improved query optimizer.