|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help on elapse time to return data ????Dear all,
I have build an ASP.net application which calls different store procedure. When my customer request data from store procedure, I would like to display on the page, the time it takes to return data. How to do that ? regards serge Something like that
create proc myproc1 as --here is your body's code --usage declare @dt datetime set @dt=getdate() exec myproc1 select datediff(s,@dt,getdate()) drop proc myproc1 Show quote "serge calderara" <sergecalder***@discussions.microsoft.com> wrote in message news:0A3D7622-0901-420D-A5F1-CCF7127BE43C@microsoft.com... > Dear all, > > I have build an ASP.net application which calls different store procedure. > When my customer request data from store procedure, I would like to > display > on the page, the time it takes to return data. > > How to do that ? > > regards > serge To add to Uri's response, you can also calculate the elapsed time in your
application. C# example: DateTime startTime = DateTime.Now; //execute query TimeSpan duration = DateTime.Now.Subtract(startTime); Response.Write(duration.ToString(); -- Show quoteHope this helps. Dan Guzman SQL Server MVP "serge calderara" <sergecalder***@discussions.microsoft.com> wrote in message news:0A3D7622-0901-420D-A5F1-CCF7127BE43C@microsoft.com... > Dear all, > > I have build an ASP.net application which calls different store procedure. > When my customer request data from store procedure, I would like to > display > on the page, the time it takes to return data. > > How to do that ? > > regards > serge Thnaks dan, I will do that
regards serge Show quote "Dan Guzman" wrote: > To add to Uri's response, you can also calculate the elapsed time in your > application. C# example: > > DateTime startTime = DateTime.Now; > //execute query > TimeSpan duration = DateTime.Now.Subtract(startTime); > Response.Write(duration.ToString(); > > -- > Hope this helps. > > Dan Guzman > SQL Server MVP > > "serge calderara" <sergecalder***@discussions.microsoft.com> wrote in > message news:0A3D7622-0901-420D-A5F1-CCF7127BE43C@microsoft.com... > > Dear all, > > > > I have build an ASP.net application which calls different store procedure. > > When my customer request data from store procedure, I would like to > > display > > on the page, the time it takes to return data. > > > > How to do that ? > > > > regards > > serge > > > |
|||||||||||||||||||||||