Solved

PK and Indexes DW Database

Posted on 2011-02-24
2
300 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

706 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