April 14, 2014 at 1:08 am
Inserting from my current table to archive table on same database
Insert into archivetable
Select * from table
Select * from table has 20 columns and 25 rows
Archivetable table has 20 columns and 2.5 million rows
inserting from table to archivetable some times taking nearly a 10 sec , sometimes it is happening in 16 millisecond, sometimes it is taking 0 millisecond to insert.
during all the inserts ,there were no high cpu usage.
there were no other statement is running during that time.
but why the insert is varying hugly?
April 14, 2014 at 3:32 am
If there isn't any blocking or any other SQL statement running at that moment..could network congestion be an issue ? or automatic file growth happening at the background ? ... SSC experts would be able to provide more insight ..
April 14, 2014 at 3:47 am
This is normal.
This is due to internal SQL Server processing. Sometime when query plan is available for your query it will executed immediately. Also in the destination table if pagesplit or anyother thing needs to be happening than it may take slightly longer time. Also it depends on the server load and resource availability.
HTH
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply