AquaGrrlll
2006-09-21 09:12:12 UTC
I'm trying to improve the performance of an update on a database table.
Initially, I used TADODataSet components and updated the contents using
Edit/Post. The performance wasn't brilliant, so I decided to use stored
procedures. The procedure I built was as follows:
CREATE PROCEDURE dpersUpdateIndividual
@ID bigint,
@Title varchar(10),
@Surname varchar(50),
@First_Name varchar(20),
@Middle_Names varchar(50),
AS
UPDATE Individual
SET
vchSalutation = @Title,
vchFirstName = @First_Name,
vchMiddleName = @Middle_Names,
vchLastName = @Surname,
WHERE (iIndividualId = @ID)
Real simple. All I did from the Delphi side was use a TADOStoredProc,
fill in the parameters, call ExecProc. It didn't affect the performance
one iota. If anything, it got worse, although we have a busy network
which gets busier as the day wears on, so that may have been a factor.
I had a look at the table concerned and it had quite a few indexes, all
of which are updated when you update a record. I created other stored
procedures to drop these indexes and re-create them, so that they
wouldn't interfere with the Updates and tried again. A little
improvement, this time, but not as much as I would have thought.
All this has lead me to suspect that TADOStoredProc may be the culprit.
Does anyone know if there are any performance issues with this
component, or that there are some settings of either the component or
TADOConnection which would improve this?
Initially, I used TADODataSet components and updated the contents using
Edit/Post. The performance wasn't brilliant, so I decided to use stored
procedures. The procedure I built was as follows:
CREATE PROCEDURE dpersUpdateIndividual
@ID bigint,
@Title varchar(10),
@Surname varchar(50),
@First_Name varchar(20),
@Middle_Names varchar(50),
AS
UPDATE Individual
SET
vchSalutation = @Title,
vchFirstName = @First_Name,
vchMiddleName = @Middle_Names,
vchLastName = @Surname,
WHERE (iIndividualId = @ID)
Real simple. All I did from the Delphi side was use a TADOStoredProc,
fill in the parameters, call ExecProc. It didn't affect the performance
one iota. If anything, it got worse, although we have a busy network
which gets busier as the day wears on, so that may have been a factor.
I had a look at the table concerned and it had quite a few indexes, all
of which are updated when you update a record. I created other stored
procedures to drop these indexes and re-create them, so that they
wouldn't interfere with the Updates and tried again. A little
improvement, this time, but not as much as I would have thought.
All this has lead me to suspect that TADOStoredProc may be the culprit.
Does anyone know if there are any performance issues with this
component, or that there are some settings of either the component or
TADOConnection which would improve this?