|
Posted by Roy Harvey on 07/19/06 00:05
Not starting over every night would certainly be the best approach,
but anyway....
One thing you might try is to leave the clustered index on the table,
and order the data by the clustering key before loading. It is
possible that the longer time to load with the index in place will be
more than offset by the time saved in creating the clustered index.
Roy Harvey
Beacon Falls, CT
On 18 Jul 2006 13:58:55 -0700, "shelleybobelly"
<shelleybobelly@yahoo.com> wrote:
>Hi,
>
>I have a new job. It needs to drop and re-create (by insert) a table
>every night. The table contains approximately 3,000,000 (and growing)
>records. The insert is fine, runs in 2 minutes. The problem is that
>when I create the indexes on the table, it is taking 15-20 minutes.
>There is one clustered index and 11 non-clustered. This is a lookup
>table that takes many different paremeters, so it really needs the
>indexes for the user interface to run efficiently. However, the
>database owners aren't keen on a job taking 20 minutes to run every
>night.
>
>Any ideas?
[Back to original message]
|