| View previous topic :: View next topic |
| Author |
Message |
Gabriel Ballesteros Guest
|
Posted: Thu Feb 19, 2004 4:48 pm Post subject: Slow performance TAdoTable.Post |
|
|
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
|
Posted: Fri Feb 20, 2004 2:17 am Post subject: Re: Slow performance TAdoTable.Post |
|
|
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
|
Posted: Fri Feb 20, 2004 1:17 pm Post subject: Re: Slow performance TAdoTable.Post |
|
|
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 |
|
 |
|