I have a windows service running multiple threads, each one is updating the database inside a transaction. To update the table i am using a TypedDataSet.
If i only define 1 thread, each task get done one after another and everyuthing works quiete fine. But when setting multiple threads things get really slow.
Even more, when tested isolated from the rest (using nunit), the performance is more than acceptable.
In the case with only 1 thread, each insert/update command takes about 0.0015s to 0s. With multiple threads it goes from 0.35 to 5 to 7 seconds.
When tested alone takes between 0.0015 to 0s. This values are obtained using the dbMonitor (i can send you the log if you need them.)
It is important to say that there is no error, it simple takes to much time. Anothe thing is that in the same transaction i call package's procedures (using also devart) and they always takes the same ammount of time and they are really fast.
To update the datatable i am using the method LoadDataRow to make changes to the datatable and then call the Update. Also i am setting
DataTable.MissingSchemaAction = System.Data.MissingSchemaAction.Add;
I am using version 5.30.79.
Performance + MultiThread + TypedDataSets
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44