A trick that can work on any DBMS to substantially speed up an insertion is to disable temporarily the indexes, foreign keys and constraints prior to bulk inserting the data - then enable them again after your data in the database.
Especially indexes can be performance-killers for sequential insertion, it's faster by at least an order (sometimes 2!) of magnitude to fill a table first and then create the index on the already filled data than to insert with the index in place. In this case you might need to drop the index, then recreate it.
Then, as most other posters have already said, it's really a waste of time to insert stuff a row at a time if you can do it in bunches. You'll get a minor speed improvement if you open the table with no locking at all or only optimistic locking.
And then you might get another tiny increment by using DAO recordsets instead of ADO - I noticed this back in the days when I developed in VB6, probably this is not the case anymore with ADO.NET
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…