• I see the execution plan returns 8 columns of data and 90 rows, but had estimated 237,932;

    I see that WR_SCOPE_FITUP is actually a view of other tables; are you sure you need to use the view? can you query the tables directly?

    for me, the first thing I would do is update statistics

    for all the tables that are used in the view.

    I see a lot of Compute Scalar operations in the exection plan, so I suspect th3e view is filled with them;

    my next priority would be to looka t the view, and change the scalar functions to inline table value functions;

    It's a big plan, I'll keep looking at it to see if I see anything obvious.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!