G
GPO
On 27 June I posted asking for advice on why a query would be running very
slowly and yet at the same time, not troubling the CPU greatly. I still
don't know the answer to this question, but I have done some experimenting
and have achieved some dramatic results.
Method 1:
Use SQL INSERT INTO to append (in this instance) 1.6 million rows and 26
columns of data from a text file (as a linked table) to a highly indexed
table (24 indexes).
Results:
Time taken : 493 mins and 57 secs
Method 2:
Same as method 1 but with all the indexes removed from the table.
Time taken: 88 seconds!
Time taken to reload the indexes using ADOX Indexes.Append: 336 seconds.
Total: 7 mins 4 secs.
Clearly there are times when it is not appropriate to append to an indexed
table, but better to apply the indexes afterwards. I would be grateful for
others experience.
GPO
slowly and yet at the same time, not troubling the CPU greatly. I still
don't know the answer to this question, but I have done some experimenting
and have achieved some dramatic results.
Method 1:
Use SQL INSERT INTO to append (in this instance) 1.6 million rows and 26
columns of data from a text file (as a linked table) to a highly indexed
table (24 indexes).
Results:
Time taken : 493 mins and 57 secs
Method 2:
Same as method 1 but with all the indexes removed from the table.
Time taken: 88 seconds!
Time taken to reload the indexes using ADOX Indexes.Append: 336 seconds.
Total: 7 mins 4 secs.
Clearly there are times when it is not appropriate to append to an indexed
table, but better to apply the indexes afterwards. I would be grateful for
others experience.
GPO