Re: Delphi 6 - ADO - MS SQL Server
- From: "Steve Zimmelman" <skz@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Sep 2006 09:14:47 -0500
How much time to post are you talking about? I have a client who has a 40 gig
DB, 100+ users, using SQL Server and ADO, with no performance issues.
Every table has a primary. We use TAdoQuery for reading and some posting, and
some stored procedures for updating. I stopped using the TADOStoredProc and use
mostly dynmaic SQL to address the SP's.
For example, your SP could be executed:
ADOCommand1.CommandText :=
'dpersUpdateIndividual '+
InToStr(ID)+','+
QuotedStr(Title)+','+
QuotedStr(Surname)+','+
QuotedStr(FirstName)+','+
QuotedStr(MiddleName) ;
ADOCommand1.Execute ;
-Steve-
"AquaGrrlll" <sparry@xxxxxxxxxxxxx> wrote in message
news:4512576c$1@xxxxxxxxxxxxxxxxxxxxxxxxx
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?
.
- Follow-Ups:
- Re: Delphi 6 - ADO - MS SQL Server
- From: AquaGrrlll
- Re: Delphi 6 - ADO - MS SQL Server
- References:
- Delphi 6 - ADO - MS SQL Server
- From: AquaGrrlll
- Delphi 6 - ADO - MS SQL Server
- Prev by Date: Re: ADO exception with character combination inside string...
- Next by Date: Re: ADO exception with character combination inside string...
- Previous by thread: Delphi 6 - ADO - MS SQL Server
- Next by thread: Re: Delphi 6 - ADO - MS SQL Server
- Index(es):
Relevant Pages
|
|