I just started learning to build nodejs application. I am able to figure how things work so i made decision to test my application with large test data. I create json file with 1 million records in it.
I import data using
mongoimport --host 127.0.0.1 --port 27017 --collection customers --db Customer --file "path to json file mock.json" --jsonArray
Sample Json file is
[{"fname":"Theresia","lname":"Feest","email":"aileen@okeefe.name"},
{"fname":"Shannon","lname":"Bayer","email":"tristian.barrows@christiansenvandervort.com"},
{"fname":"Cora","lname":"Baumbach","email":"domenico.grimes@lesley.co.uk"},
{"fname":"Carolina","lname":"Hintz","email":"betty@romaguerasenger.us"},
{"fname":"Dovie","lname":"Bartell","email":"rogers_mayert@daniel.biz"}]
but it is taking too much time approx. 14 Hrs.
Please suggest any other optimized ways for the same.