Mirroring, Fragmentation & Buffer Cache

  • I have a few questions regarding mirroring:

    1. is the data laid down page for page on the mirror? I.e if there is a very fragmented index on the primary, will it be fragmented on the secondary?

    2. Is the buffer cache mirrored? i.e will all pages in cache on the primary be in cache on the mirror, so the cache is not "cold" on failover?

    Thanks!

  • Think of mirroring as really fast log shipping. The transaction log replay includes the target pages of the modifications. The buffer cache is not part of the transaction log.

    So, to answer the questions:

    1. Yes - a restored database is a copy of the source, including fragmentation

    2. No - the target instance has its own buffer cache, and that will be used for the processes in use by that instance. Duplicating the buffer cache would require that the target have enough free cache space to maintain all of the entries in the source, and would also require all of the pages read by the source to be transmitted to the target. If this were a feature of mirroring, I would shut it off immediately.

    -Eddie

    Eddie Wuerch
    MCM: SQL

  • Thanks for the super quick reply Eddie, exactly what I needed to know!

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

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