Solved

Is indexing possible in snapshot Database (SQL Server 2005)

Posted on 2009-06-27
8
179 Views
Last Modified: 2012-05-07
I am planning on using a Snapshot Database for a read-only database that is being used for reporting, using the SNAPSHOT OF command.

Is it possible to create index on this snapshot database, to make the reports more efficient?

Thanks
0
Comment
Question by:anushahanna
  • 4
  • 2
  • 2
8 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 250 total points
ID: 24730055
snapshots actually fetches the data from the original database, so if you create the index on the original db your queries will be able to use this
0
 
LVL 6

Author Comment

by:anushahanna
ID: 24730062
so the indexes carry over to the snapshot database?

But can we create any new index on the snapshot database?
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 210 total points
ID: 24730063
I urge you to read the article I posted in your other thread:
Capture the reporting benefits of database snapshots in SQL Server 2005
http://articles.techrepublic.com.com/5100-10878_11-6146916.html

The key part is in the first sentence:
"Database snapshots allow you to create read-only databases for reporting and can also be useful in your data recovery efforts in the event of a disaster."
I am not sure how much clearer that has to be.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24730064
>>But can we create any new index on the snapshot database?<<
Let's try it this way:  No.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 24730131
acperkins,
very sorry.. that was a big oversight on my part.. Thanks for your patience and clarrifying that in simplest terms.

I had read that article when you mentioned it first, and observed the heart of what this feature is all about.

You have convinced me of snapshot databases, and i have been playing with it some, and i was thinking hard before moving on, this topic being new to me, if i am missing any other details, and that is where this oversight came into the picture..

aneeshattingal,
Thanks for mentioning the moving of the indexes into the destination Snapshot database. That makes perfect sense.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 24730135

in my test, the Snapshot database queries, some complex, were much faster than in the source database. What feature of snapshot database would you attribute this to?
0
 
LVL 6

Author Closing Comment

by:anushahanna
ID: 31597637
The question was due to an oversight, but the answers gave me a good perspective, understanding, and also reading the article again, re-affirmed what i have been learning for the past 2 weeks.
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24730141
may be it is using a differebt execution plan, check and compare the execution plans
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question