BusyTimeout and high concurency question
Posted: Sun 15 Jan 2017 13:56
Hi,
I have two kinds of threads in my application:
1. Threads for fast writes: insert/update/delete one record.
2. Threads for bulk operations: insert/delete millions records.
Bulk opterations are split by 5000 inserts/deletes per transaction.
My question is: how long I should sleep between bulk transactions to let other threads perform fast (one record) insert/update/delete transactions ?
For bulk operations I perform:
PauseTime should depends on how frequently LiteDac checks for active transactions during BusyTimeout ? If I set 100 milliseconds - it's will be enouch for other threads (who waits in BusyTimeout) to see what database no longer locked and it's possible to perfrom their fast transactions ?
Thanks for help !
I have two kinds of threads in my application:
1. Threads for fast writes: insert/update/delete one record.
2. Threads for bulk operations: insert/delete millions records.
Bulk opterations are split by 5000 inserts/deletes per transaction.
My question is: how long I should sleep between bulk transactions to let other threads perform fast (one record) insert/update/delete transactions ?
For bulk operations I perform:
Code: Select all
while not done do
begin
StartTransaction;
Make5000Inserts;
Commit;
Sleep(PauseTime); // How long I should sleep to let other threads perform quick writes ?
end;
Thanks for help !