Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

PK and Indexes DW Database

Posted on 2011-02-24
2
Medium Priority
?
354 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 1000 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

647 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