• What continues to be a mystery is why a procedure that has been running since 2005 for 20 minutes would increase to 11+ hours. (It appears to me that the optimizer is forcing a cursor operation.)

    Enter "tipping point" in the search box up there and read the articles and posts it will return you.

    It should clear your mystery.

    Once again - data accessing function in SELECT list is a cursor.

    Before some stage there was probably enough memory to hold all results of the functions in memory and reuse them for following rows.

    Now you have either more sets of parameters the before or less memory because of more users, other applications launched on the same server, etc.

    Anyway, there is no enough memory for all data accessing functions results, and server has to run all "hidden cursors" you put into the query.

    _____________
    Code for TallyGenerator