Dear fellows,
The following loop bring me differents results, execute one after one (among
them a truncate table, of course):
DECLARE @.loop as integer
set @.loop = 1
while @.loop < 10000
begin
insert into A_test(id,nombre,ape) values(@.loop,'a','aadfasdf')
set @.loop = @.loop + 1
end
1st: 26 sec.
2nd: 30 sec.
3rd: 32 sec.
What's happening?
Any input would be much appreciated.
Enric"Enric" <Enric@.discussions.microsoft.com> wrote in message
news:F66A1DC3-E5CD-4B06-AE4E-53818843E3C5@.microsoft.com...
> Dear fellows,
> The following loop bring me differents results, execute one after one
> (among
> them a truncate table, of course):
> DECLARE @.loop as integer
> set @.loop = 1
> while @.loop < 10000
> begin
> insert into A_test(id,nombre,ape) values(@.loop,'a','aadfasdf')
> set @.loop = @.loop + 1
> end
>
> 1st: 26 sec.
> 2nd: 30 sec.
> 3rd: 32 sec.
> What's happening?
> Any input would be much appreciated.
> Enric
What other processes are running on your server while this is running.
Page splitting or allocation of new extents to store your data may be
happening.
Indexes may be getting updated
Statistics may be getting updated
It's hard to say what the real culprit is. These are some things that I
would check however.
Rick Sawtell
MCT, MCSD, MCDBA|||Well, what does your Profiler say?
ML
http://milambda.blogspot.com/|||Thanks to both for the quick responses but I was wondering about the
difference among them. It seems very high. We are talking about 6 or 7
seconds for a total of 35 more or less..
"Rick Sawtell" wrote:
> "Enric" <Enric@.discussions.microsoft.com> wrote in message
> news:F66A1DC3-E5CD-4B06-AE4E-53818843E3C5@.microsoft.com...
> What other processes are running on your server while this is running.
> Page splitting or allocation of new extents to store your data may be
> happening.
> Indexes may be getting updated
> Statistics may be getting updated
>
> It's hard to say what the real culprit is. These are some things that I
> would check however.
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment