Why is this query slow?

  • Attached is an actual plan and the current entire query. We did make some changes based on some of the feedback, so you'll see it's different than the original.

  • And now the second try:

    You must be logged in to view attached files.
  • This was removed by the editor as SPAM

  • Paste the plan is probably better than this.

    Well, if I'm looking at the right query plan, #10?, it looks radically different. 1 row out 4 estimated? The last one was estimating 20,000 rows. Was it really the same? If so, looks like it may be a win. There are some key lookup operations you could try to eliminate, but estimated four rows actual 1 is pretty happy.

    How is performance now?

    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore Roosevelt
    The Scary DBA
    Author of: SQL Server 2022 Query Performance Tuning, 6th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • You could also put it in a zip file and upload that to the site.


  • Here's the plan, zipped.

    You must be logged in to view attached files.

Viewing 6 posts - 16 through 20 (of 20 total)

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