What indexes should I add to odsstaging to improve the performance of this query

Plan.pesession (37.5 kB)
avatar image By NickF 0 asked Feb 19 at 02:31 PM
more ▼
(comments are locked)
10|10000 characters needed characters left

1 answer: sort voted first


In the title of the post, you are asking about adding indexes to odsStaging. I assume that is a table, but, you posted an anonymized plan which does not have table names. The only index or table seek or scan I found was on Object3.Index1, which was an index scan. You may be able to create a non-clustered index on that table on the Column20 data to get better performance on that Scan. Though the Estimated plan shows only 1 row being returned by that scan, so it would appear an index would not help on that object.

Looking at your plan, I see two Table-Valued Functions (TVF) that are the bulk of the estimated CPU cost. One function returns 648,000 records each of the 31 times it is being called. The other function is returning more than 59 million records for each of its 13 times being called.

If you are looking to improve the query performance, I strongly recommend analyzing what the TVFs are doing and if there is a better method.

avatar image By SDyckes2 96 answered Feb 19 at 08:58 PM
more ▼
(comments are locked)
10|10000 characters needed characters left
Your answer
toggle preview:

Up to 50 attachments (including images) can be used with a maximum of 209.7 MB each and 209.7 MB total.

Follow this question



asked: Feb 19 at 02:31 PM

Seen: 52 times

Last Updated: Feb 19 at 08:58 PM