This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Start the MongoDB Container | |
docker run --name mongo -d mongo | |
docker exec -i mongo sh -c 'mongoimport -d oreilly -c students --drop --type json' < students.json | |
// Check that Mongodb adds a projection on non-used fields | |
db.students.explain("executionStats").aggregate( [ | |
{ $group: { _id: "$grade", frequency: { $sum: 1 } } }, | |
{ $match: { "frequency": { $gt : 10 } } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |