BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Slow performance TAdoTable.Post

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Gabriel Ballesteros
Guest





PostPosted: Thu Feb 19, 2004 4:48 pm    Post subject: Slow performance TAdoTable.Post Reply with quote



I'm developing any application with Delphi5 and MySQL 4,0,15 maxdebug. I'm
use MySQL ODCB 3.51.06 with ADO components to connect MySQL .

I have the following piece of code :

Table1.Open;
while not Table1.Eof do
begin
Table1.Edit;

Table1.FieldByName('salary').AsFloat:=Table1.FieldByName('salary').AsFloat *
1.5;
Table1.Post; // Here exists slow performance.
Table1.Next;
end;
Table1.Close;

The problem is that when invoking the edit and post methods the application
present slow peformance.

The same piece of code using TTable(BDE) executing with high performance.

The table having 3000 records.

Excuse me for my English.

Gabriel Ballesteros
Medellín - Colombia


Back to top
Del Murray
Guest





PostPosted: Fri Feb 20, 2004 2:17 am    Post subject: Re: Slow performance TAdoTable.Post Reply with quote



1. Dont use TTable under ADO, it reads the whole table everytime.
2. You must have a primary key or the whole table will be scanned trying to
determine which record is the correct one to update.
Your problem is probably number 1.


Back to top
Gabriel Ballesteros
Guest





PostPosted: Fri Feb 20, 2004 1:17 pm    Post subject: Re: Slow performance TAdoTable.Post Reply with quote



I'm using TADOTable (Table1 is one instance of class TADOTable) and have
defined the primary key in the indexname property.

"Del Murray" <Del.Murray (AT) CreditHawk (DOT) Net> escribió en el mensaje
news:40356db5 (AT) newsgroups (DOT) borland.com...
Quote:
1. Dont use TTable under ADO, it reads the whole table everytime.
2. You must have a primary key or the whole table will be scanned trying
to
determine which record is the correct one to update.
Your problem is probably number 1.





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.