Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

missing indexes on distributor database

$
0
0

Looking for missing indexes on my distributor databases, I surprisingly find too many.

the tables that need to be indexed are generally 3:

MSrepl_commands

MSlogreader_history

MSdistribution_history

Here is the picture of the missing indexes

enter image description here

Now concentrating on TABLE MSdistribution_history

It all seems to boil down to these 3 indexes:

USE distribution_BOCSS;
CREATE NONCLUSTERED INDEX 
IDX_agent_id_time_xact_seqnorunstatus_INC_delivery_latency 
ON [distribution_BOCSS].[dbo].[MSdistribution_history] 
 ([agent_id], [time], [xact_seqno], [runstatus]) 
 INCLUDE (delivery_latency,start_time,timestamp) WITH (ONLINE = ON)


USE distribution_BOCSS; 
CREATE NONCLUSTERED INDEX IDX_runstatus_INC_agent_id_delivery_latency 
ON [distribution_BOCSS].[dbo].[MSdistribution_history] 
([runstatus]) 
INCLUDE (agent_id,delivery_latency,time,xact_seqno,timestamp) 
WITH (ONLINE = ON)


    USE distribution_BOCSS; 
    CREATE NONCLUSTERED INDEX IDX_agent_idrunstatus_INC_time_xact_seqno_delivery_latency 
    ON [distribution_BOCSS].[dbo].[MSdistribution_history] 
([agent_id], [runstatus]) 
    INCLUDE (time,xact_seqno,delivery_latency,timestamp,start_time)
     WITH (ONLINE = ON)

However, as I would imagine, the amount of updates on the current existing clustered index is very high (not sure since when it has been adding up to these stats, possibly since the last reboot) as you can see on the picture below:

enter image description here

The writes are too high, it is a production system, I would like to have more support regarding this. Would I really benefit by creating these indexes?

Is there any documentation that supports creating indexes on the distributor databases of transactional replication?

Why Microsoft has not supplied these databases with the proper indexes on them?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



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