List, Jonathan was spot on. As soon as I added an index on (maudrecno, memrecno) in the test database the time dropped from 4:14 to 3 seconds. I have copied and pasted the outputs from the dev environment: https://docs.google.com/file/d/0B9YC82qZ8_3eYlJGalRVQTM3cUU/edit Thanks for all the people who helped. Ram.