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-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 10:38 PM
Points: 182, Visits: 469
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


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 11:43 PM
Points: 4,986, Visits: 11,682
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.
Post #1521415
Posted Tuesday, December 10, 2013 12:52 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 10:38 PM
Points: 182, Visits: 469
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: Yesterday @ 3:55 PM
Points: 13,357, Visits: 10,222
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


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 11:43 PM
Points: 4,986, Visits: 11,682
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.
Post #1521419
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse