Re: TADOStoredProc
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Thu, 11 Oct 2007 19:43:11 -0500
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
TAdoQuery sets the SQL using a Tstringlist while TadoDataset uses a
Widestring;
While both can set the SQL in the underlying ADO dataset there is a
performance penalty if you set it one line at a time like
AdoQuery.sql.Add('this line');
leads you to do
But it's always worth remembering that the performance penalty for each
additional CPU operation is only nanoseconds, rather than the milliseconds
for each additional disk access.
I'm not saying that tAdoDataSet and tAdoCommand aren't a "better fit" to
the underlying ADO architecture, just that simply replacing all tAdoQuerys
and tAdoStoredProcs in an under-performing program probably /won't/ give a
significant speed boost.
( But I still pre-calculate invariants and store them in local variables
before every FOR loop :) )
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- Follow-Ups:
- Re: TADOStoredProc
- From: Paul Scott
- 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
- TADOStoredProc
- Prev by Date: Re: Field 'ID' can not be modified in master/detail
- Next by Date: Re: Field 'ID' can not be modified in master/detail
- Previous by thread: Re: TADOStoredProc
- Next by thread: Re: TADOStoredProc
- Index(es):
Relevant Pages
|