drop and create INDEX in ETL

  • 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.

  • 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.


  • Thanks Phil,

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

    Thanks

    Abhas.

  • 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.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • 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?


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply