MongoDB performance test code
Write 1 million records, build an index, and use the index for 100000 consecutive queries.
Use admin;// connection database db.auth ("mongoAdmin", "123456"); / / log in to use test;// connection test library db.test_collection.dropIndexes (); db.test_collection.drop (); print ("insert begin:" + Date ()) / / write start time people = ["Marc", "Bill", "George", "Eliot", "Matt", "Trey", "Tracy", "Greg", "Steve", "Kristina", "Katie", "Jeff"]; for (var item10; I