Mongo DB Bulk Load

0.2 millions rows from CSV file (~73 MB) imported into MongoDB in 4.607 seconds… Command to import into mongodb is as follows – refer Tech Explosion…!!!: Mongo DB Bulk Load. for more details:
~~~
The command takes the following form:
mongoimport –host 192.168.56.101 –port 10000 –db iDBench –collection collection1 –type csv –file collection1.csv –headerline

–host *Host address on which Mongo DB server is running
–port *Port number
–db *Database name
–collection *Collection name
–type *The type of the export format to import. The default format is JSON, but it’s possible to import csv and tsv file.
–file *Specify the location of the file containing the data to import. mongoimport will read data from standard input(e.g. “stdin.”) if you do not specify a file.
–headerline *If using “–type csv” or “–type tsv” use the first line as field names. Otherwise ,mongoimport will consider it as a distinct document
~~~

Following is output in the mongod console:
~~~
Sun Oct 13 22:51:35.470 [initandlisten] connection accepted from 127.0.0.1:52319 #3 (1 connection now open)
Sun Oct 13 22:51:35.473 [FileAllocator] allocating new datafile D:\Daya\open_source\mongodb\data\db\ism.ns, filling with zeroes…
Sun Oct 13 22:51:35.511 [FileAllocator] done allocating datafile D:\Daya\open_source\mongodb\data\db\ism.ns, size: 16MB, took 0.037 secs
Sun Oct 13 22:51:35.511 [FileAllocator] allocating new datafile D:\Daya\open_source\mongodb\data\db\ism.0, filling with zeroes…
Sun Oct 13 22:51:35.657 [FileAllocator] done allocating datafile D:\Daya\open_source\mongodb\data\db\ism.0, size: 64MB, took 0.145 secs
Sun Oct 13 22:51:35.658 [FileAllocator] allocating new datafile D:\Daya\open_source\mongodb\data\db\ism.1, filling with zeroes…
Sun Oct 13 22:51:35.661 [conn3] build index ism.quickstatus { _id: 1 }
Sun Oct 13 22:51:35.666 [conn3] build index done. scanned 0 total records. 0.003 secs
Sun Oct 13 22:51:35.668 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:195648 195ms
Sun Oct 13 22:51:36.038 [FileAllocator] done allocating datafile D:\Daya\open_source\mongodb\data\db\ism.1, size: 128MB, took 0.377 secs
Sun Oct 13 22:51:37.339 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:38 115ms
Sun Oct 13 22:51:40.299 [FileAllocator] allocating new datafile D:\Daya\open_source\mongodb\data\db\ism.2, filling with zeroes…
Sun Oct 13 22:51:40.941 [FileAllocator] done allocating datafile D:\Daya\open_source\mongodb\data\db\ism.2, size: 256MB, took 0.64 secs
Sun Oct 13 22:51:48.588 [FileAllocator] allocating new datafile D:\Daya\open_source\mongodb\data\db\ism.3, filling with zeroes…
Sun Oct 13 22:51:49.610 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:101965 101ms
Sun Oct 13 22:51:49.773 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:144553 144ms
Sun Oct 13 22:51:49.931 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:113735 115ms
Sun Oct 13 22:51:50.177 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:88 245ms
Sun Oct 13 22:51:50.476 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:106679 107ms
Sun Oct 13 22:51:50.618 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:79 141ms
Sun Oct 13 22:51:50.918 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:121 141ms
Sun Oct 13 22:51:51.437 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:209268 211ms
Sun Oct 13 22:51:51.696 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:113 136ms
Sun Oct 13 22:51:53.196 [FileAllocator] done allocating datafile D:\Daya\open_source\mongodb\data\db\ism.3, size: 512MB, took 4.607 secs
Sun Oct 13 22:51:57.703 [conn3] insert ism.quickstatus ninserted:1 keyUpdates:0 locks(micros) w:353908 353ms
Sun Oct 13 22:52:05.010 [conn3] end connection 127.0.0.1:52319 (0 connections now open)
~~~

Advertisements
Tagged with: ,
Posted in MongoDB, Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: