Is it possible to optimize this SQL to get rid of 2 highlighted subqueries?

  • Is it possible to optimize this statement to get rid of the case named [aging]?

    specifically, the two highlighted statements that cause 90% of all waits in the entire select statement.

    4 attachments: entire SP, the CULPRIT SQL, and the full Stored Proc where it is called +screenshot that shows fully confirmed problem statements that cause 90 % of all waits here.  That subquery is executed 300K times (number of resultset rows). both tables are over 100 000 000 rows and 300 columns.



    You must be logged in to view attached files.

    Voldemar likes to play CHESS (and IS good at it!)

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply