slow updates
Posted: Thu 19 Dec 2013 15:07
I have the following code whereby I am updating a number of records in table containing about 40,000 records. MessagesT is a TUniTable.
UniConnection1->StartTransaction();
for(int i=0; i<30; i++){
MessagesT->RecNo = tagged;
MessagesT->Edit();
MessagesT->FieldByName("Tag")->AsInteger = 1;
MessagesT->Post();
}
UniConnection1->Commit();
The code takes about 1 second to update each record which is too slow for my purposes. What can I do to speed this up?
Thanks
UniConnection1->StartTransaction();
for(int i=0; i<30; i++){
MessagesT->RecNo = tagged;
MessagesT->Edit();
MessagesT->FieldByName("Tag")->AsInteger = 1;
MessagesT->Post();
}
UniConnection1->Commit();
The code takes about 1 second to update each record which is too slow for my purposes. What can I do to speed this up?
Thanks