Print Page | Close Window

Running Stored procedure

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4055
Printed Date: 12-May-2026 at 10:59pm


Topic: Running Stored procedure
Posted By: PeterProva
Subject: Running Stored procedure
Date Posted: 19-Mar-2013 at 12:51pm
Hi guys,
I am using StoredProcedureQuery in Devforce 6.1.7  Silverlight 5 and it takes 15 to 17 seconds,however same Stored procedure on the server is not even 1 second.Any idea?
thx



Replies:
Posted By: sbelini
Date Posted: 19-Mar-2013 at 2:20pm
Peter,

What does the stored procedure do? Is it retrieving records? How many?

Additional time is taken to instantiate records into objects. (i.e. entities)
Also, remember that these entities go across the wire to reach the client.


Posted By: PeterProva
Date Posted: 20-Mar-2013 at 6:30am
Thanks,
Stored procedure output is just a Number you can asume the getting the Max Number.


Posted By: sbelini
Date Posted: 21-Mar-2013 at 9:33am
Peter,

Is this the very first operation performed?

Do subsequent calls to the same stored procedure take as long as the first execution?

If the call to the stored procedure is the first operation, the issue could be the startup time.
You can take a look at the server debug log to determine if that's the case.
If the startup time is indeed the issue, you can reduce startup time by controlling discovery. You will find more details at http://drc.ideablade.com/xwiki/bin/view/Documentation/discovery - http://drc.ideablade.com/xwiki/bin/view/Documentation/discovery .


You could also time the execution in the QueryInterceptor. This would help compare the execution time in the server (i.e. BOS) vs. in the client and determine if the data traffic would actually be the culprit. More details at http://drc.ideablade.com/xwiki/bin/view/Documentation/query-server-lifecycle-events - http://drc.ideablade.com/xwiki/bin/view/Documentation/query-server-lifecycle-events .



Print Page | Close Window