New Posts New Posts RSS Feed: Running Stored procedure
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Running Stored procedure

 Post Reply Post Reply
Author
PeterProva View Drop Down
Newbie
Newbie


Joined: 04-Feb-2013
Posts: 19
Post Options Post Options   Quote PeterProva Quote  Post ReplyReply Direct Link To This Post Topic: Running Stored procedure
    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
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
PeterProva View Drop Down
Newbie
Newbie


Joined: 04-Feb-2013
Posts: 19
Post Options Post Options   Quote PeterProva Quote  Post ReplyReply Direct Link To This Post Posted: 20-Mar-2013 at 6:30am
Thanks,
Stored procedure output is just a Number you can asume the getting the Max Number.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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.


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.


Edited by sbelini - 21-Mar-2013 at 9:34am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down