Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

drop and create INDEX in ETL Expand / Collapse
Author
Message
Posted Tuesday, December 10, 2013 12:37 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, November 24, 2014 7:37 AM
Points: 228, Visits: 568
Hi All,

I am siply loading and updating data from one table to another.But data is huge and number of column are also high. So i want to drop index initially and once data is loaded then i need create index on that table. In the target table there is no primary key.

How can i aschieve this? please suggest ideas.


Thanks
Abhas.
Post #1521413
Posted Tuesday, December 10, 2013 12:47 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 2:15 AM
Points: 5,317, Visits: 12,354
abhas (12/10/2013)
Hi All,

I am siply loading and updating data from one table to another.But data is huge and number of column are also high. So i want to drop index initially and once data is loaded then i need create index on that table. In the target table there is no primary key.

How can i aschieve this? please suggest ideas.


Thanks
Abhas.


No magic required:
1) ExecuteSQL task to drop index.
2) Dataflow task to load data.
3) ExecuteSQL task to create index.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt. (Mark Twain)
Post #1521415
Posted Tuesday, December 10, 2013 12:52 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, November 24, 2014 7:37 AM
Points: 228, Visits: 568
Thanks Phil,

But there is no Primary key in the target table , so can go with non-clustered index or clustered index?


Thanks
Abhas.
Post #1521416
Posted Tuesday, December 10, 2013 12:59 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Thursday, December 18, 2014 12:52 PM
Points: 13,636, Visits: 11,509
abhas (12/10/2013)
Thanks Phil,

But there is no Primary key in the target table , so can go with non-clustered index or clustered index?


Thanks
Abhas.


You can either add a primary key (clustered or non-clustered) or just add a non-clustered index.
It really depends on the data and how the table is going to be queried.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1521418
Posted Tuesday, December 10, 2013 12:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 2:15 AM
Points: 5,317, Visits: 12,354
abhas (12/10/2013)
Thanks Phil,

But there is no Primary key in the target table , so can go with non-clustered index or clustered index?


Thanks
Abhas.


Why does the absence of a PK have any bearing on dropping and creating an index? Is there something you are not telling us?



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt. (Mark Twain)
Post #1521419
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse