• gmrose (10/21/2010)


    Thank you again to Lutz and Wayne. I updated my script per Lutz' suggestions to use table #tmpChecks instead of table variable @tmpChecks. I made some minor adjustments to exclude about 100,000 unneeded rows. Now the script runs as desired.

    For timing, yesterday's script ran for over 23 hours and was less than 5% complete when I halted it. Today's script succussfully completed in less than 4 minutes. That's what I call a real improvement.

    gmrose

    Not sure if I'd be happy with that performance yet... (even without using the quirky update)

    How long does each part of the two actually take? (timing for populating the temp table and for the final select)

    Another question:

    Are you sure that your WHERE condition "ISNUMERIC(PrintedCheckNum) = 1" will actually return the results as needed? What would you do with a row holding '100E12'??

    At this point I'd really like to see the actual execution plans before making any suggestions...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]