Improving the repricing SQL