Solved

Is indexing possible in snapshot Database (SQL Server 2005)

Posted on 2009-06-27
8
176 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable to save view in SSMS 21 69
Trying to identify overlapping date ranges 5 22
Alter a column in sql 34 30
replicated - directional or bidirectional? 3 29
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

772 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