Home All Groups Group Topic Archive Search About

Help on elapse time to return data ????

Author
23 Mar 2006 10:47 AM
serge calderara
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

Author
23 Mar 2006 10:55 AM
Uri Dimant
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
Author
23 Mar 2006 12:59 PM
Dan Guzman
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

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
Author
23 Mar 2006 3:24 PM
serge calderara
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
>
>
>

AddThis Social Bookmark Button