When is the best time to create indexes?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: When is the best time to create indexes?

  1. #1
    Join Date
    Mar 2001
    Posts
    46

    Question

    I've heard that it's best to create an index on an empty table before loading the table via sqlldr.

    Fact/Fiction or does it depend on the data? Any tips will be appreciated.

  2. #2
    Join Date
    Jan 2001
    Posts
    126
    Hi,

    You should create the index after the data is loaded. This will ensure a balanced index tree to start with.

    Also create the index when there is low system activity.

    Baliga

  3. #3
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Absolutely wait until the table is populated, as mbaliga stated. Not only because of the balanced tree issue, which is *very* important, but also because it is faster to process.

    Create Index
    Load data
    Analyze

    is SLOWER than

    Load data
    Create Index
    Analyze

    - Chris

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    it's basically because index is a independant segment therefore if you create index first then load data you would essentially inserting *twice*, both data & index segments

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width