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
FbBulkCopy class for faster import [DNET1041] #952
Comments
Commented by: Baldur Fürchau (bfuerchau) FbBulkCopy class with basic implemtation. |
Modified by: Baldur Fürchau (bfuerchau)Attachment: FbBulkCopy.cs [ 13590 ] |
Commented by: André Ziegler (andre.ziegler) fork the code on github ( https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient ), commit the changes to new branch and if you added everything, create a pullrequest so that it can be checked and merged |
Commented by: @cincuranet It's also good to discuss in the mailing list first, because other people might give valuable feedback on the problems they are trying to solve, so the implementation is done in a way that it's useful for many and not only for one. |
Commented by: Baldur Fürchau (bfuerchau) After some further investigations i found, that the firebird have too much limits to do a BulkCopy with standard features. 1) An Execute Block can have only restricted number of parameters. The size of bytes have not be bigger than the current rowsize (64K). If you work with UTF8, the buffersize becomes 4 times smaller. I didn't check the break even, but i have checked the following times in I7, 2.6GHz. Copy a Table form D1 to DB2 with only 8 Columns, the bulk copy is 3 times faster than single insert. Conclusion: |
Submitted by: Baldur Fürchau (bfuerchau)
Attachments:
FbBulkCopy.cs
I have developed a class FbBulkCopy, similar the SqlBulkCopy. I can't reach the speed of SQL-Server, but with less columns and small records the speed is good.
I create an execute block (p1...pn) with many insert into table (:p1...:pn); end;
Restrictions are: The size of parameters must be within recordsize 64K, the size of block must be less 64k.
But, for example, an insert with 8 columns speeds up from 8000 to 22.500.
Where can i send/upload my class, so you can check this if it can be used for Firebird client?
Some fieldtypes must be added.
The text was updated successfully, but these errors were encountered: