View Single Post

   
  #2 (permalink)  
Old 02-27-2008, 06:06 PM
Kevin
 
Posts: n/a
Default Re: Fact Table load - drop pk ?

Inserting into an empty heap table is generally the fastest You'll need to
write a "post load" routine to add the indexes back in -

the approach I find most robust and high performance is as follows:

drop NC indexes
drop clustered index
load the data using a bulk api (bcp, bulk-insert, DTS bulk, etc)
create the clustered index
defrag clustered index <-- non intuitive, but optimal in many cases
create the PK (if PK is not clustered)
create other constraints
create the NC indexes
create statistics
dbcc updateusage

Before automating all this you'll obviously need to record the existing
indexes, constraints and statistics

----------------------------------------------------
The views expressed here are my own
and not of my employer.
----------------------------------------------------
"Phil" <atec396@hotmail.com> wrote in message
news:03ab01c3554f$3b3767d0$a401280a@phx.gbl...
> I want to increase performance on a fact table load.
> The table has only a pk defined on an identity column.
>
> Since it would help performance to drop all indexes
> and then load a fact table. Is there anyway I can drop
> the clustered index that is automatically created
> on the identity column and then recreate it.
>
> Would this help performance is the bottom line.



Reply With Quote