Reputation: 2951
I am wondering, how the TClientDataSet
is executing the SQL statment when ApplyUpdates
is invoked.
If there is more than one record changed, is the update SQL query prepared and sent for each record as single SQL statment or is there maybe a SQL 'script' created and than sent at once to the database?
I mean, is there a performance difference, when I ApplyUpdates
on very record change in contrast to ApplyUpdates
for all changes at once?
Upvotes: 3
Views: 1142
Reputation: 37221
No SQL is sent from the client, only the delta packet. The provider on the server receives the delta packet and generates insert/update/delete SQL statements based on it. Sending multiple updates in a single request usually leads to better performance.
Upvotes: 7