Solved

PK and Indexes DW Database

Posted on 2011-02-24
2
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 40

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

739 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