Re: TADOStoredProc
- From: "Paul Scott" <paul.scott@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 12 Oct 2007 15:39:06 +0100
On Fri, 12 Oct 2007 01:43:11 +0100, Brian Bushay TeamB <BBushay@xxxxxxxxx> wrote:
Its not a CPU cycle issue. It is an issue with How ADO handles the change in the SQL. Every time you add to the SQL it sends those changes back to the database. That is not efficient so don't use Add() set All the commandtext or
the SQL.text property
Very good point! I bow to your superior knowledge of the internals of ADO.
(I don't hit this since I build all my SQL commands in a single delphi string for logging & timing purposes)
But even though I haven't done any testing (so I'm not letting any evidence limit my ability to pontificate :) ), I would still guess that it would be an "unusual" SQL statement where LAN round-trip latencies /significantly/ outweigh the time needed for the database to analyse exactly what that SQL was asking for, to determine the best route to achieve that result from the tables - and, especially, to rattle the disks, filter and marshal the results and then transfer all that data back.
Of course, YMMV if your code looks like...
SQL.Clear
SQL.Add ( 'Select' )
SQL.Add ( 'CustomerId,')
SQL.Add ( 'CustomerName,' )
....
My intention was only to say that if anyone is looking to solve a database performance problem, they may find it more profitable to first look at the strategy - such as limiting the number of separate database accesses (and then the amount of data transferred each time) - rather than fiddling with the tactics.
( Except for remembering to "DisableControls"! )
--
Paul Scott
Information Management Systems
Macclesfield, UK.
.
- Follow-Ups:
- Re: TADOStoredProc
- From: Niklas Larsson
- Re: TADOStoredProc
- References:
- TADOStoredProc
- From: Alan T
- Re: TADOStoredProc
- From: Brian Bushay TeamB
- Re: TADOStoredProc
- From: Niklas Larsson
- Re: TADOStoredProc
- From: Brian Bushay TeamB
- Re: TADOStoredProc
- From: Nigel Jones
- Re: TADOStoredProc
- From: Brian Bushay TeamB
- Re: TADOStoredProc
- From: Paul Scott
- Re: TADOStoredProc
- From: Brian Bushay TeamB
- TADOStoredProc
- Prev by Date: Re: Field 'ID' can not be modified in master/detail
- Next by Date: Re: TADOStoredProc
- Previous by thread: Re: TADOStoredProc
- Next by thread: Re: TADOStoredProc
- Index(es):
Relevant Pages
|