AOG INDEXING

  • OK,

    I don't have AOG setup yet, if I have a db that is part of my AOG. The indexes will be setup for OLTP operations.

    I am not concerned about failing over the LIVE server to the AOG at any point. HA will be taken care of by the cluster. However in terms of indexes, if I wanted this db to be tuned for my reports can I still drop and create indexes to optimize my SSRS report execution on the AOG db without the sync having any issues.

    This db although the data would be the same as LIVE would need to backed up separately as the schema would be different.

  • You need to think of Always On in terms of Log Shipping or Mirroring. The secondary databases can be configured to read from, but you can't update them directly, so you can't apply an alternate set of indexes. To do this you would need to use replication.

    With replication you can replicate only the data (and the required Primary Key), and then configure alternate indexes on the subscriber database. This can be very effective, allowing you to exclude data you won't be reporting on since replication can be configured at fairly low level.

    Cheers

    Leo

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • Thanks, thats not ideal. I think most people will use the replica for SSRS. Big flaw in the design then.

    If I want to tweak the index for reports they need to be added to the LIVE db. Very poor oversight.

  • emile.milne (1/23/2013)


    Thanks, thats not ideal. I think most people will use the replica for SSRS. Big flaw in the design then.

    If I want to tweak the index for reports they need to be added to the LIVE db. Very poor oversight.

    Not really, Always On is first a high availablity solution, and second an alternate data source for reporting etc. In most situations I've found Replication an excelent option for reporting.

    Leo

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • emile.milne (1/23/2013)


    Thanks, thats not ideal. I think most people will use the replica for SSRS. Big flaw in the design then.

    If I want to tweak the index for reports they need to be added to the LIVE db. Very poor oversight.

    Always On incorporates mirroring from 2005/2008 and makes the mirror database read only without having to create a database snapshot. Great for high availability and reporting that does not need different indexing than the principal database currently supporting an application.

    If you were able to add indexes on one of the "mirrors" (Always On can have up to 4, 2 synchronous and 2 asynchronous) you would be changing the database structure. Not something one would want on a database that could become the principal database for an application if there was a failure of some sort.

  • emile.milne (1/23/2013)


    Thanks, thats not ideal. I think most people will use the replica for SSRS. Big flaw in the design then.

    If I want to tweak the index for reports they need to be added to the LIVE db. Very poor oversight.

    Not an oversight. The wrong tool for the job. Availability groups is primarily there so that if/when a disaster hits your primary database, you can switch to any of the secondaries and continue working with minimal to no interruption.

    Availability groups, like mirroring (and log shipping), work by replaying the log records from the primary, not replaying the original. So an insert on the primary would result in log records that said 'insert this into allocation unit X and this into allocation unit Y'. The internal structure of the databases much be completely, 100% identical and the log records must match exactly (identical LSNs) or that replay of the log records will not be possible. That means that every operation done on the primary goes to the second and no other operations can be done on the secondary or the LSNs and internal structure will no longer match.

    For a secondary server that has a different schema and is not log-sequence identical with your primary, you're looking for one of the replication forms, transactional most likely. That allows for as many different replicas as you like, with different indexing structures, possibly even different subsets of the data, with rollup and aggregation tables, different stored procs and views, etc.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 6 posts - 1 through 5 (of 5 total)

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