Hi,

I actually increased the undo_retention to 4500, it was set to 900 orginally. Do u mean decrease the the undo in conjunction with the use to temp tables? Because i thought the solution to getting rid of ORA-01555 errors is to increase the undo_retention parameter.
Also this database is shutdown daily so i cannot understand how the query has been running for such a long time?

Thanks in advance