Re: Help with Stored Procedure Execution Speed - Delphi 6
- From: "Kittipong Kiatcheeranun" <kk_tomas@xxxxxxxxxxx>
- Date: Sat, 29 Oct 2005 00:50:53 +1000
"Eric Stewart" <stewarte@xxxxxxxxxxxxxxxxxx> wrote in message
news:43612c1e@xxxxxxxxxxxxxxxxxxxxxxxxx
>I have a stored procedure - MS SQL 2000 - that runs in less than 3 minutes
> in query analyzer and returns around 13000 records. However, in my Delphi
> 6
> application, I call the stored procedure using a TADOQuery passing the
> appropriate parameters and it times out. I have been increasing the time
> out
> setting just to see how long it would take. I currently have it set at 16
> minutes and I still time out. I have tried using DisableControls on the
> query because I think I read somewhere that that should help.
Ado connections normally has default time out after 30 seconds. The timeout
may come from several reasons such as your query takes longer than timeout
or poor network performance. If you query through ADO you can use the
Profiler to see how much time it takes for your query when you do it from
ADO. And you also can use Performance monitor tool to see where is causes of
the timeout; for example, bottle neck from your network, disk accessing,
RAM, CPU or etc.
You can improve your performance and get rid of the timeout by.
1. Edit the query timeout as you've already done.
2. You need to make sure you have the right indexes on the table and you
query by using those indexes too. (You may need to rebuild your indexes, let
see in SQL server help)
3. Be careful about Locking.
4. In some cases, if you have a heap of data, upgrade hardware might help
you too.
Hope may help
Regards
Kittipong Kiatcheeranun
.
- References:
- Help with Stored Procedure Execution Speed - Delphi 6
- From: Eric Stewart
- Help with Stored Procedure Execution Speed - Delphi 6
- Prev by Date: Re: Pb while closing ADO query
- Next by Date: Re: Delphi BPL ADO : You do not have an appropriate license to use this functionality.
- Previous by thread: Help with Stored Procedure Execution Speed - Delphi 6
- Next by thread: trigger causes exception
- Index(es):
Relevant Pages
|