all groups > sql server programming > may 2005 >
You're in the

sql server programming

group:

T-SQL Update statment moore information


T-SQL Update statment moore information AJ
5/31/2005 11:37:01 PM
sql server programming:
Giving moore information about my problem....
SQL Server 2000 enterprise (sTABLE have only 3 records)

Sample:

select convert(varchar,getdate(),114)
update sTABLE set COLUMNcounter=-9 where COLUMNkey=110100100001
select convert(varchar,getdate(),114)

---------------------------------------
21:16:07:903

(1 row(s) affected)


(1 row(s) affected)


---------------------------------------
21:16:07:917

(1 row(s) affected)

I have a delay in the update process, I only want to know if this behavior
is normal ??? or what I'm doing wrong ..... because I'm processing a big
block of information with that kind of querys.

I did test with select and insert statments, but this statments, I had 1
milisecond of delay, thats great, but I have more than 13 milisecond of delay
with a simple update statment.

I only whant to know, if this behavior in the update statment is normal...??
or I'm doing something wrong...??

Thanks a lot, for your time.
Re: T-SQL Update statment moore information Narayana Vyas Kondreddi
6/1/2005 12:00:00 AM
Your update is bound to take 'some' amout of time for sure. But if you are
saying it is taking too long, then see the graphical execution plan in Query
Analyzer. Make sure the WHERE clause of your update is using an index.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @ http://vyaskn.tripod.com/


[quoted text, click to view]
Giving moore information about my problem....
SQL Server 2000 enterprise (sTABLE have only 3 records)

Sample:

select convert(varchar,getdate(),114)
update sTABLE set COLUMNcounter=-9 where COLUMNkey=110100100001
select convert(varchar,getdate(),114)

---------------------------------------
21:16:07:903

(1 row(s) affected)


(1 row(s) affected)


---------------------------------------
21:16:07:917

(1 row(s) affected)

I have a delay in the update process, I only want to know if this behavior
is normal ??? or what I'm doing wrong ..... because I'm processing a big
block of information with that kind of querys.

I did test with select and insert statments, but this statments, I had 1
milisecond of delay, thats great, but I have more than 13 milisecond of
delay
with a simple update statment.

I only whant to know, if this behavior in the update statment is normal...??
or I'm doing something wrong...??

Thanks a lot, for your time.
God bless you.

AddThis Social Bookmark Button