Solved

Is indexing possible in snapshot Database (SQL Server 2005)

Posted on 2009-06-27
8
170 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Suggested Solutions

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now