The main reason your scenario is slow is that you are forcing disk I/O at every insert. If your were to wrap your inserts into a transaction, they would go much faster. If that's too many at once, group them into multiple transactions. But keep the group size much greater than 1.