Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

Merging Suggested Indexes

$
0
0

Good morning,

I've been looking at some query plans this morning to try and improve the performance of some of our longer/slower queries.

I'm wondering if there's a way to use the information from the suggested/missing indexes and merge into a useful index.

I'm reluctant to just add everything which is suggested as I dont want to add too much overhead when it comes to inserts (even tho this is a data warehouse, there are a fair few inserts happening 5-6 times a day).

So, I'm wondering if it's possible to do something with the suggested indexes (below):

CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [HAHBI_REP].[t_rep_all_clients] ([Class],[Referring Establishment])

CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [HAHBI_REP].[t_rep_all_clients] ([Class])
INCLUDE ([H@H Number])
GO

So, the above two indexes are suggested by SQL Server, but I'm wondering if it's possible to do something like the below to try combine the two with the net result being that the index would be used by the different queries.

CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [HAHBI_REP].[t_rep_all_clients] ([Class],[Referring Establishment])
INCLUDE ([H@H Number])
Is it possible to do such a thing, or is the only real way to test and see what happens?
Is there any resource which would better explain how to combine the suggested/missing indexes?

Regards,

Andy


Viewing all articles
Browse latest Browse all 5123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>