- Mastering MongoDB 3.x
- Alex Giamas
- 62字
- 2021-08-20 10:10:55
touch
The touch command will load data and/or index data from storage to memory. This is typically useful if our script will subsequently use this data, speeding up execution:
> db.runCommand({ touch: "bookOrders", data: true/false, index: true/false })
This command should be used with caution in production systems, as loading data and indexes into memory will displace existing data from it.