Monday, July 8, 2013

[T-SQL] time elapsed between sp completed and RPC completed

[T-SQL] time elapsed between sp completed and RPC completed


time elapsed between sp completed and RPC completed

Posted: 07 Jul 2013 11:59 PM PDT

I ran a trace on a slow running remote stored proc call:exec db1.mydb.dbo.spInsertSomeRowsThe trace ran on the desination server (db1). I captured the sp:completed and prc:completed events. Noticed that sometimes there was a duration difference between the two events for the same produre call, sometimes more than half a second. Could someone please explain to me what made the difference? Note though other times all were fine, either the duration of the two events were the same, or a couple of millisec away, which was expected. Thanks!

Split data

Posted: 07 Jul 2013 05:08 PM PDT

Hi all, I was trying to split the values using DENSE RANK but I faced some issues...here is the problem below:Create table tbl1( ID INT identity primary key,voucherno varchar(10),modifieddate datetime)insert into tbl1values('V00001','2013-07-07 11:32:44.810'),('V00002','2013-07-07 11:32:44.810'),('V00003','2013-07-08 12:32:44.810'),('V00004','2013-07-08 12:32:44.810'),('V00005','2013-07-07 11:32:44.810')OUTPUTMinVoucher MaxVoucher ModifieddateV00001 V00002 2013-07-07 11:32:44.810V00003 V00004 2013-07-08 12:32:44.810V00005 V00005 2013-07-07 11:32:44.810I tried using DENSE_RANK but i didnt get my desired output.

No comments:

Post a Comment

Search This Blog