MongoDB常用shell
作者:互联网
MongoDB常用shell
1.切换数据库
use DATABASE_NAME
2.查看数据库
show dbs
3.创建索引
db.collection.createIndex(keys, options)
示例:
db.grids.createIndex({"zoom_level": 1, "tile_column": 1, "tile_row": 1})
4.查看索引
db.COLLECTION_NAME.getIndexes()
示例:
db.grids.getIndexes()
标签:常用,shell,NAME,grids,示例,MongoDB,db,tile 来源: https://www.cnblogs.com/gis-flying/p/16358871.html