Update Statistics

  • In AG, mirroring, Log Shipping and Transactional replication if I Update statistics on primary will it run on secondary also?

  • I would say "Yes" as it is a logged and persisted operation.

    Easy to check using sys.dm_db_stats_properties for a given statistics.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • I wouldn't say it was executed on the secondary - but the updates are sent to the secondary and applied.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Transactional replication would be a no as replication isn’t tracking update statistics operations.  All that cares about is insert/update/delete statements.

    The indexes on your subscriber could be 1 million times different to that on the publisher so replicating statistic updates for a statistic which doesn’t exist would cause failures.

    Replication doesn’t need to be an exact replica of primary so you must think of these as two completely different databases.

    The other 3 though yes as the whole log is replayed in those technologies, as each copy of the DB is an exact replica.

Viewing 4 posts - 1 through 3 (of 3 total)

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