locked
Database Indices Issue RRS feed

  • Question

  • Hi All,

    let's suppose we have a Table (abc) in Database there are 5 Indices in this table.

    when Data Loading (inserting data in this table) start first we drop it's indices then we start loading data in it.

    because inserting data in table having many indices takes long time.

    is there any solution we insert a large amount of data without droping it's indices?

    Thanks,

    Mohsin

    Tuesday, October 1, 2013 2:21 PM

Answers

  • Instead of dropping you could disable the indexes; after loading you can "enable" = rebuild all indexes, this way the index definition will not be removed.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Proposed as answer by Sanil Mhatre Tuesday, October 1, 2013 2:59 PM
    • Marked as answer by Rao Mohsin Thursday, October 3, 2013 1:43 PM
    Tuesday, October 1, 2013 2:35 PM

All replies

  • Instead of dropping you could disable the indexes; after loading you can "enable" = rebuild all indexes, this way the index definition will not be removed.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Proposed as answer by Sanil Mhatre Tuesday, October 1, 2013 2:59 PM
    • Marked as answer by Rao Mohsin Thursday, October 3, 2013 1:43 PM
    Tuesday, October 1, 2013 2:35 PM
  • but it takes time approx. to creating index?

    Mohsin

    Thursday, October 3, 2013 1:44 PM
  • Of course it takes some time to rebuild the index, that's quite normal and depends on the size of the table/index.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, October 4, 2013 7:04 AM