January 16, 2020 at 5:52 pm
#pastetheplan https://www.brentozar.com/pastetheplan/?id=SJF21m0lU
I'm trying to figure out what's causing this query (part of a stored procedure) to be so slow. The NOLOCK hints were an earlier attempt to stop deadlocks, I'm guessing they are likely no longer necessary.
I did add an index that helped a ton, but this is still pretty slow and I'm not sure what direction to go in next.
This was the old plan before I added the index it craved:
And this is the new/current plan:
January 16, 2020 at 5:53 pm
Gah! Sorry, didn't mean to post twice - site timed out during the original post.
January 16, 2020 at 7:52 pm
Here are some initial observations based on the execution plan:
January 16, 2020 at 8:03 pm
There is an index for ServiceDate on that table, although that table has a ton of indexes on it. We're very likely trying to do too much here (indexes with sensible names = us, the two new ones at the bottom are Azure performance indexes it's added and is validating):
No, I don't think that @CaTs (categories) has many rows. This query is part of a larger that that's attempting to validate new claims against a set of rules of various categories. We're first determining what categories might apply, then finding relevant paid claims that might be relevant in the evaluation.
Yes, absolutely that index exists:
CREATE NONCLUSTERED INDEX [IX_ClaimPaidDetail_ClaimID] ON [Claims].[ClaimPaidDetail]
(
[ClaimID] ASC
)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy