Issues with execute as a statement

Hi All,

  1. I am running an update statement and while running using execute as script it is updating in 22 seconds. While i am running the same statement using execute as statement it is taking a lot more time so far it has taken more than 10 mins and still continuing. Is there any difference between them that is causing this problem or is it anything to do with my query.
  2. I am running an update statement using execute as script and while i am trying to run the same query again for a different year it is taking quite a long time. while I ran the first query it showed me the number of records updated so i dont think it could be an issue with the query but why is it not working while running for the second time.

Update statement has multiple sub queries and a join.

Please any suggestions/answers for the above questions are highly appreciated.

Message was edited by: shashikiran

I dont think there is any difference between both execute as statement or execute as script in terms of updating as per the statement. The reason for my issue was there were couple of lockis that got created. I closed my toad reopened it and it worked like a charm. So, whenever a query is taking longer time than it should better idea is to close the toad and reopen it :-).