MongoDB Flashcards
Atomicity _________ isolation durability
Consistency
Atomicity consistency ___________ durability
Isolation
____________ consistency isolation durability
Atomicity
Atomicity consistency isolation ____________
Durability
ACID
Atomicity consistency isolation durability
.explain() Verbosity levels
queryPlanner
executionStats
allPlansExecution
____________
executionStats
allPlansExecution
queryPlanner
queryPlanner
_______________
allPlansExecution
executionStats
queryPlanner
executionStats
________________
allPlansExecution
Create index in background
{background:true}
Create text index
{field:”text”}
Default write concern
w:1
Enable sharding
sh.enableSharding(‘collection’)
Shard collection
sh.shardCollection(‘collection’, {shard:key});
Get shard status
sh.status();
Add shard to cluster
sh.addShard(‘rs/server:port’);
Create time to live TTL index
{expireAfterSeconds:360}
List indexes
db.collection.getIndexes();
Remove index
db.collection.dropIndex({index:signature});
Add to replica set
rs.add(“hostname:port”);