I am about to go through some detailed performance tests, and before I do, I wanted to get any feedback as for the best practices (and perhaps some tips/tricks within the library) to streamline the results.
My application has no user interface. It is a job scheduler, that runs as a windows service.
It runs multi-threaded (one session / thread).
I have a baseline, of our application using our existing library (its one of your competitors). My hope is that once I tweak the library as you all suggest, that I will see it perform as well as, or even better.
I am thinking things like ...
- FetchAll false
- set a meaningful and realistic FetchRows
- DisableControls on all queries
Thanks, in advance, for suggestions.
Best Practice / Recommendations
Re: Best Practice / Recommendations
Hello,
1) If you work with large tables - then, when setting FetchAll to true, time for opening such tables significantly increases, but navigation through DataSet speeds up.
2) FetchRows makes sense only when fetchAll= false. This option is responsible for the number of records retrieved on each reading operation, and affects the size of the package retrieved from the server. For maximum performance, this option value should be selected experimentally.
3) If you develop a non-VCL applicaiton without visual data access components, then the DisableControls method won't affect performance.
P.S. To decrease used memory, you can also use the UniDirectional property (if there is no need to navigate backwards through DataSet).
1) If you work with large tables - then, when setting FetchAll to true, time for opening such tables significantly increases, but navigation through DataSet speeds up.
2) FetchRows makes sense only when fetchAll= false. This option is responsible for the number of records retrieved on each reading operation, and affects the size of the package retrieved from the server. For maximum performance, this option value should be selected experimentally.
3) If you develop a non-VCL applicaiton without visual data access components, then the DisableControls method won't affect performance.
P.S. To decrease used memory, you can also use the UniDirectional property (if there is no need to navigate backwards through DataSet).