![](https://secure.gravatar.com/avatar/bd55d72cd1482d47fd55a63dbbb04bd9.jpg?s=120&d=mm&r=g)
I don't know how Firebird handles this, but you should try if
a) it has a direct way to import XML data in some way
b) you can get away with generating "INSERT OR UPDATE" statements.
In general, a large amount of database roundtrips will make your program much slower than a direct import of a database dump, sometimes by orders of magnitude. Generating a SQL dump file and letting the DB load that directly is bound to be much faster.
Assuming the usage of the kinterbasdb firebrid driver, the most efficient way would be to send a list of tuples as parameters for such a Update/Insert statement. The statement would have to be only prepared (pseudo-compiled, whatever) _once_ at the server side. And the number of network roundtrips will also be minimal. --dirk