title: Migrate data from PostgreSQL to MongoDB
body: <p>I have to migrate 5 million records from <code>PostgreSQL</code> to <code>MongoDb</code>.</p>
  
  <p>I tried using <code>mongify</code> for the same but as it runs on <code>ruby</code> and I am not at all acquainted with ruby i couldn't solve the errors posed by it.</p>
  
  <p>So, I tried writing a code myself in <code>node.js</code> that would first convert <code>PostgreSQL data</code> into <code>JSON</code> and then insert that JSON into <code>mongoDb</code>.
  But, this failed as it ate a lot of RAM and not more than 13000 records could be migrated.</p>
  
  <p>Then I thought of writing code in <code>Java</code> because of its garbage collector. It works fine in terms of RAM utilization but the speed is very slow (around 10000 records/hour). At this rate it would take me days to migrate my data.</p>
  
  <p>So, Is there a more efficient and faster way of doing this? Would a python program be faster than the Java program? Or is there any other ready-made tool available for doing the same?</p>
  
  <p>My system configuration is :
    OS - Windows 7 (64 bit), 
    RAM - 4GB,
    i3 processor</p>