Forum Stats

  • 3,824,983 Users
  • 2,260,449 Discussions
  • 7,896,370 Comments

Discussions

explain plan looks ok but the statement is still taking a bit of time

2»

Answers

  • Jonathan Lewis
    Jonathan Lewis Member Posts: 9,974 Blue Diamond
    edited Jun 6, 2016 4:29AM

    It might be faster - but you don't know whether the time is spent on identifying the data to be updated or on performing the subqueries that calculate new values; and since it appears that there are two (or more) columns being updated by two significantly differing subqueries that involve analytic functions it might not be possible to create an efficient USING subquery for a merge; so it might be better to wait to see what the statement looks like before guessing how best to change it.

    Regards

    Jonathan Lewis

  • Chris Hunt
    Chris Hunt Member Posts: 2,066 Gold Trophy
    edited Jun 6, 2016 4:35AM

    Can you move your monitor closer to the window? I'm having difficulty seeing your update statement.

    AndrewSayer
  • user13328581
    user13328581 Member Posts: 1,343 Silver Badge
    edited Jun 6, 2016 4:15PM

    Hi the version is 12c. After further digging, I realized the reason why the update statement is slow is due to the number of triggers created on the required updated table.

This discussion has been closed.