RE: Is it a good idea to have primary key on DW table
From: Powell, Mark <mark.powell2_at_hp.com>
Date: Wed, 4 Aug 2010 13:56:03 +0000
Message-ID: <7C4BF3B32B80CC44AE37D31B172415935420537DE7_at_GVW1337EXC.americas.hpqcorp.net>
If you want the database to protect the integrity of the data from the insertion of logically duplicate data then declaring a PK contraint on the column(s) that make up the PK is a good idea even in a warehouse. The same would be true for FK declarations.
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Anupam Pandey Sent: Wednesday, August 04, 2010 12:54 AM To: oracle Freelists
Cc: pandey83_at_gmail.com
Subject: Is it a good idea to have primary key on DW table
Date: Wed, 4 Aug 2010 13:56:03 +0000
Message-ID: <7C4BF3B32B80CC44AE37D31B172415935420537DE7_at_GVW1337EXC.americas.hpqcorp.net>
If you want the database to protect the integrity of the data from the insertion of logically duplicate data then declaring a PK contraint on the column(s) that make up the PK is a good idea even in a warehouse. The same would be true for FK declarations.
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Anupam Pandey Sent: Wednesday, August 04, 2010 12:54 AM To: oracle Freelists
Cc: pandey83_at_gmail.com
Subject: Is it a good idea to have primary key on DW table
Hi Listers,
I was trying to do a poc whether its good idea to have the primary key constraint on FACT table in DW envioronment or not .
Here is what i found :-
- Once I loaded the table for few days and started the primary key creation process ,other select queries on that table was blocked.
SID SQL_ID SQL_HASH_VALUE BLOCKING_INSTANCE BLOCKING_SESSION SQL_TEXT 1 322 5adg0zfm9zrat 2795494745 alter table FACT_TEST add constraint pk_FACT_TEST primary key (<COLUMN_LIST>) 2 389 9n8jftdhvb5q0 1639290560 1 322 select date_key,count(*) from fact_test group by date_key
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Aug 04 2010 - 08:56:03 CDT