New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With a little change the reader will load data with GetValues(myValues) 30% faster [DNET1038] #949
Comments
Commented by: Baldur Fürchau (bfuerchau) writing error;-). |
Modified by: Baldur Fürchau (bfuerchau)environment: Windows 10 20H2, Visual Studio 20H2, I7 2,6GHz, 16 GB Memory, Firebird 3.0 => Windows 10 20H2, Visual Studio 2019, I7 2,6GHz, 16 GB Memory, Firebird 3.0 summary: With a little change the reader will load data with GetValues(myValues) 30% faster => With a little change the reader will load data with GetValues(myValues) 20% faster |
Modified by: Baldur Fürchau (bfuerchau)description: I have loaded the Version 7.10.1.0 because the clr 4.8 is not available on all customers, but the improvement is also for the latest version. So I have checked the source for the GetValue()-Method:
Because all checks are done you can directly load the row values. An additional reason to use Firebird. => I have loaded the Version 7.10.1.0 because the clr 4.8 is not available on all customers, but the improvement is also for the latest version. So I have checked the source for the GetValue()-Method:
Because all checks are done you can directly load the row values. An additional reason to use Firebird. summary: With a little change the reader will load data with GetValues(myValues) 20% faster => With a little change the reader will load data with GetValues(myValues) 30% faster |
Modified by: @cincuranetstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: @cincuranet But the `IscException` is not handled, isn't it? |
Commented by: Baldur Fürchau (bfuerchau) Thats right, but you can do try/catch around to change the exception. By th way: If you are interested i create my own FbBulkCopy like SQL-Server has. |
Commented by: Baldur Fürchau (bfuerchau) Finally i made an additional enhencement:
1) if the argument too small i send an exception like other readers does. It makes no sence, to get less values as available. With this changes i get now 15.500 Rows/Second on my machine. Also if DataTable or DataAdapter fills DataTable-Objects, for every column is checked the index which is always correct. Additional the loadingmechanism gets the GetValues() with check index for each column and does call also IsDBNull for each column where the index checks again. So this improve also the loading behavier. Try it;-). |
Your code is missing the code with Also I don't think that skipping |
Quickly looking into npgsql I see that it's doing the same in case the array is smaller. |
I'm closing this now, because I believe the proposed changes are not equivalent. But, that doesn't mean I'm not open to suggestions for optimizations, etc., quite the opposite. |
Submitted by: Baldur Fürchau (bfuerchau)
I have loaded the Version 7.10.1.0 because the clr 4.8 is not available on all customers, but the improvement is also for the latest version.
In my little test i use generally the GetValues() from th FbDataReader to process all values the same time.
With the current version i get for a table with 90 columns an average of 8500 rows per second.
The Micorosft SwlDatareader give me for the same table 10000 rows per second.
So I have checked the source for the GetValue()-Method:
Because all checks are done you can directly load the row values.
With this only little change i get now 12000 Rows per Second and this is 20% faster than SQL Server and 30% than current version.
An additional reason to use Firebird.
The text was updated successfully, but these errors were encountered: