Page 1 of 1

performance

Posted: Wed 05 Sep 2007 16:13
by Willo
Hi;

i've been searching on this forum and internet about improve performance, but so far nothing seems to work.

this is the scenario:

i have a small table 6000 records, i use Mytable to Append, Edit and Delete records from that table.

Also, i have a CRdbgrid connected to that table.

The problem is that posting changes (updates or inserts), takes long time.

I'd tried with Fetchall and unidrectional (this property by the way gives me strange behavior on the CRdbgrid).


Is there other options i should try?

Posted: Thu 06 Sep 2007 06:46
by Antaeus
These two options can decrease memory utilization, open time of a dataset, but you should not use them if you want to hasten insert and edit operations. How much time takes one post operation at the average?
Do you connect to a local database, or to a remote one?
Also supply me the following information:
- exact version of MyDAC. You can see it in the About sheet of TMyConnection Editor;
- exact version of your IDE (including personality if you use Delphi 2005 or BDS 2006);
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.

Posted: Thu 06 Sep 2007 11:46
by Willo
Im conecting to a database on a server using a 100mb network,

every post takes from 15 to 25 secs, tested on different computers on the network.

im using mydac 3.55.0.23 for Delphi 7, MySQL server version: 5.0.37-community-nt and MySQL client version: 4.1.3 Direct

Posted: Fri 07 Sep 2007 15:48
by Antaeus
How many fields are in the table you edit? What data do you insert in the table (BLOB, TEXT fields, etc)?
Try to catch the query sent to the server by MySQLMonitor, or by MySQL logs. Execute this query in a different client tool like standard MySQL client, and note down the time of execution. Will there be a significant difference with MyDAC?

I also noticed that you use not the last version of MyDAC 3. The last version is 3.55.0.26. You can download it from registered user's area of our site.

Posted: Sat 08 Sep 2007 02:27
by Willo
There are just 5000+ records on the table.

The table has a text field, some char fields and 2 integer fields (48 fields).

How can i catch the query generated by the MyTable.Post?

i finally managed some money to buy the newer version, i hope that solves my performance and utf8 problems.

Posted: Tue 11 Sep 2007 08:22
by Antaeus
There are several ways to catch queries sent to MySQL server:
- add the MyDACVCL unit to the uses clause, and set the Debug property of MyTable to True;
- put the TMySQLMonitor component onto the form, and add a handler to its OnSQL event;
- run your MySQL with the --log= parameter.

You can also check these issues using MyDAC 5 Trial.