I think what is happening is that in development as there are no statistics the optimizer mode being used is rule whereas in production the statistics are current and the optimizer mode being used is cost.
If I force the Query to use the RULE based optimizer I get the response in less than a minute.
Why is this happening?

DBA01