LinuxDoku / migratordotnet

Automatically exported from code.google.com/p/migratordotnet
0 stars 0 forks source link

Multiple Insert Support with Patch #96

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Sequentially running separately INSERTS in bulk is slow (by an order magnitude 
in MSSQL at least). Collating your inserts and doing them in bulk 
is faster. I've included a patch to add support for multi-dimensional array 
inserts.

Original issue reported on code.google.com by james.sa...@gmail.com on 6 Mar 2009 at 8:24

Attachments:

GoogleCodeExporter commented 8 years ago
And again... forgot the whole patch. 

Original comment by james.sa...@gmail.com on 6 Mar 2009 at 8:50

Attachments:

GoogleCodeExporter commented 8 years ago
This is going to get applied faster if you submit a unit test for this as well.

According to wikipedia (http://en.wikipedia.org/wiki/Insert_(SQL)) this is 
supported by 
MySQL, Postgres and DB2. SQL Server 2008 supports it, but not earlier SQL 
Server 
versions from what I can tell. So as is, this patch is going to break with a 
lot of the 
providers.

Original comment by geoffl...@gmail.com on 8 Mar 2009 at 2:42

GoogleCodeExporter commented 8 years ago
Alright, added a unit test for Insert multiple. Implemented the variations for
Oracle, MSSQL and Sqlite in their providers. My tests pass on sqlite, mssql and
mysql. I don't have a test bed for the other servers. Let me know if you need
anything else.

Original comment by james.sa...@gmail.com on 8 Mar 2009 at 4:07

Attachments: