I've written a test in both DAO and ADO.NET to create and a populate a
table with 50 fields and 100,000 rows. In my DAO test I create an
Access MDB file and it takes about 14 seconds. In my ADO.NET test I
create the table in an SQL Server database and it takes about 320
seconds - which is incredibly slow. To read the data back from either
however, is very fast.
In my ADO.NET code I'm using an SQL statement like this to add each
row: INSERT INTO tablename (fieldname1, fieldname2, ...) VALUES
(value1, value2, ...).
Using the SqlTransation class to Begin and Commit the transaction for
adding a block of the rows speeds it up somewhat (137 seconds), but
this is still unacceptibly slow.
Is there a faster way ? In DAO I added rows to a recordset object
without having to perform an SQL transaction add each row. Is there a
comparable way to populate a database table in SQL Server ?
Thanks,
Anthony.
If you're going to import 100,000 rows into SqlServer, I'd
use the Bulk Insert capabilities. If you search the
above newsgroup for "bulk" and "insert", you'll probably
find a post telling how to do that.
Robin S.
-------------------------------
<anthon...@gmail.com> wrote in message
news:1166406639....@t46g2000cwa.googlegroups.com...
Anthony.
Have a merry Christmas!
Robin S.
------------------------------------
<anthon...@gmail.com> wrote in message
news:1166656235.2...@73g2000cwn.googlegroups.com...