Page 1 of 1
Optimizing MyQuery and MyConnection objects
Posted: Wed 25 Oct 2006 22:33
by crosse
I was wondering what are the best ways to optimize TMyQuery and TMyConnections objects to return large result sets quickly? And what are the best way to optimize them to insert ,delete and update rows quickly? I haven't been able to find anything that explains how to get the best performance out of the objects in the product documentation. I am using the latest version of MyDac for Borland C++ Builder 6.
Thank you.
Posted: Thu 26 Oct 2006 15:29
by Antaeus
As a rule selecting only necessary data from the server greatly increases performance. Also pay attention on FetchAll and Unidirectional modes. If FetchAll is set to False only part of the requested records will be fetched after opening. FetchAll=False mode has some restriction. Other records will be fetched on demand. If Unidirectional is set to True, FetchAll automatically becomes False. In this mode records are not cached on the client, so you can browse the record set forward only. Unidirectional mode can be useful for example for printing huge reports.
To increase performance of inserting big number of records you should pay attention on TMyLoader component. There is no way to increase performance of deletion operations by components because most of time is spent on sending data packet to the server via network and performing operation on the server.