all groups > sql server odbc > january 2004 >
You're in the

sql server odbc

group:

Urgent: Effect of inserts on a table, when the table has two indexes defined on it and has a huge number of records (320 K records) already stored in


Urgent: Effect of inserts on a table, when the table has two indexes defined on it and has a huge number of records (320 K records) already stored in vprabhu NO[at]SPAM uci.edu
1/30/2004 4:46:26 PM
sql server odbc:
There are two tables table A & table B. There are two indexes defined
on each of these tables. As I insert records into the tables (ODBC
programming), I notice that occassionally the time required to insert
the records is very high.

Normally, the time required to insert records into the two tables is
7.8 milliseconds. However occassionally the database insertion time
shoots upto 1000-1200 milliseconds.

The records to be inserted are arriving at a constant rate every 30
milliseconds, and are inserted into the tables once they are received.

I notice that the database insertion time shoots to a high value (more
than 800 millisec) at a periodic rate (every 5 minutes, equivalent to
every 10,00 records (in this case) inserted in each of the tables).
The insertion time is more or less constant (approx 7.8 millisec) all
the remaining time.

I guess the increase in insertion time has something to do with the
SQL server maintaining the indexes defined on the table. Is this
maintanence operation a periodic operation? Is there any specific
algorithm followed by the SQL server for maintaining the indexes? I am
interested in finding out, when does the server decide to maintain the
indexes.

Any help (links etc.) will be greatly appreciated.

Regards,
Vishal Prabhu
Urgent: Effect of inserts on a table, when the table has two indexes defined on it and has a huge number of records (320 K records) already stored in Invotion
2/2/2004 8:41:05 AM
Are these clustered indexes? If you have access to the
sql server try running a trace to see if you have page
splits happening at times that correspond to your long
running inserts.

Sincerely,
Invotion Engineering Team
Advanced Microsoft Hosting Solutions
http://www.Invotion.com

[quoted text, click to view]
AddThis Social Bookmark Button