January 7, 2007 at 4:08 pm
I got very slow insert operations in table which consists of millions of data already.
what factors can affect an insert operations ? please give me some idea how can make fast insertion in table.
January 7, 2007 at 4:52 pm
I am no expert but if you are trying to insert alot records and there is triggers set to create a newid for record then it will be very slow. You can disable the trigger before doing the insert and it will be much faster.
Grant
January 7, 2007 at 4:59 pm
Too many disks IO on the server
Too many indexes to reorder
Not enough memory
Temdb too small or on a slow disk (or the same disk as the insert and transaction log).
That's just to name a few. Can you give us more details on the server and the insert in question?
January 7, 2007 at 10:14 pm
Usually, the culprit is a CLUSTERED PRIMARY KEY... change it to non-clustered.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 8, 2007 at 1:02 am
Is this a plain insert that you are talking about, or does it contain lots of joins and/or a where clause? It could also be that it isn't the insert itself that is slow, but the other operations (selecting the data to be inserted). Try to run the select portion separately, without inserting, to find out how quick it works.
January 8, 2007 at 6:18 am
Of course, we could stop guessing if you'd post the code, Ashok.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply