Edward Diener
2005-05-22 13:42:01 UTC
In my application I need to insert a number of records into a fairly
large ADO table periodically. The number of records will average about
1000 and the table may have about 200000 records initially. If I create
a TADOTable for my table then, as I understand it, my table must be
populated by all the records when I make it Active. As I insert a record
into this table, changes will be going to the server's database with
each insert. This seems to be very expensive in terms of time and
memory. Is there a better way of doing this ?
I initially designed this using a client data set, so that I could apply
my inserted updates all at one time using ApplyUpdates, therefore
reducing traffic back and forth to the server database. However that is
consuming even more memory as the client dataset, connected to the table
through a provider, takes up another 200000 records in memory along with
the ADO table. Any thoughts of doing this in a better way would be
appreciated. I realize that there are always memory-speed tradeoffs and
am trying to come up with the best combination for my task.
large ADO table periodically. The number of records will average about
1000 and the table may have about 200000 records initially. If I create
a TADOTable for my table then, as I understand it, my table must be
populated by all the records when I make it Active. As I insert a record
into this table, changes will be going to the server's database with
each insert. This seems to be very expensive in terms of time and
memory. Is there a better way of doing this ?
I initially designed this using a client data set, so that I could apply
my inserted updates all at one time using ApplyUpdates, therefore
reducing traffic back and forth to the server database. However that is
consuming even more memory as the client dataset, connected to the table
through a provider, takes up another 200000 records in memory along with
the ADO table. Any thoughts of doing this in a better way would be
appreciated. I realize that there are always memory-speed tradeoffs and
am trying to come up with the best combination for my task.