Solved

PK and Indexes DW Database

Posted on 2011-02-24
2
312 Views
Last Modified: 2016-02-15
We have a SQL Server 2008 R2 database that supports the Datawarehouse. I have noticed that it does not have primary key or clustered indexes for more than 70% of tables.

The DB is around 90 GB with some huge tables which did not have primary key or clustered indexes.

Can you please guide me through the optimal practices for this DW setup with respect to Indexes and PK's.

Thanks,
0
Comment
Question by:rocky_lotus_newbie
2 Comments
 
LVL 9

Accepted Solution

by:
rajeevnandanmishra earned 250 total points
ID: 34969987
Hi,
Normally DW databases are not having the PK/FK and Custered Indexes.

The PK/Clustered Indexes are normally created in an OLTP databases where the data is quite less comparatibly and a fast retrieval is required. As the clustered index will change the physical layout of the table, so it will not have big impact in the OLTP database.
But in DW databases, If we have clustered index and it changes, then the whole (very very large table need to be changed as per the index). This is basic idea for not having the CI on big tables.


0
 
LVL 39

Assisted Solution

by:lcohan
lcohan earned 250 total points
ID: 34970859
You should optimize your OLTP/OLAP/DW databases for IO operations as needed by your applications.

CLUSTERED indexes may be indeed painful for INSERTS and DELETES of large volumes however they ensure fresh/updated statistics on tables so less indexing is required. Also they may be your best choice for partitioning large objects in your DW database.  This is valid from SQL 2000 to curent 2008.

PK and FK may not be required in your OLAP/DW dbs as your data integrity should have been checked alreay in your OLTP however purges/deletes/archiving may leave orphans in your DB's if not correctly done.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

867 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

15 Experts available now in Live!

Get 1:1 Help Now