14.1 简单 Sharding 实例...................................................................................................61
14.1.1 启动 Shard Server.............................................................................................62
14.1.2 启动 Config Server.............................................................................................62
14.1.3 启动 Route Process...........................................................................................62
14.1.4 开始配置.............................................................................................................62
14.1.5 管理命令.............................................................................................................63
14.2 高级 Sharding 实例...................................................................................................63
14.2.1 配置一个 Replica Sets + Sharding 环境............................................................63
14.2.2 增加 Shard 服务器..............................................................................................66
14.2.3 增加 ReplSet 服务器...........................................................................................66
15 数据库基本操作:增查删改...........................................................................66
15.1 Insert........................................................................................................................66
15.2 Query.......................................................................................................................67
15.2.1 Query Expression Objects:查询表达式对象...................................................67
15.2.2 查询选项............................................................................................................67
15.2.3 条件表达式........................................................................................................67
15.2.4 正则表达式........................................................................................................73
15.2.5 Sort...................................................................................................................74
15.2.6 Group................................................................................................................74
15.2.7 Distinct..............................................................................................................76
15.2.8 分页查询............................................................................................................76
15.2.9 $elemMatch......................................................................................................76
15.2.10 slaveOk...........................................................................................................77
15.2.11 Cursors 游标及 Cursor Methods.....................................................................77
15.2.12 $query/$orderby/$explain...............................................................................79
15.2.13 NULL 查询.......................................................................................................79
15.2.14 Covered Indexes.............................................................................................80
15.2.15 Dot Notation....................................................................................................80
15.2.16 $slice...............................................................................................................81
15.3 Remove...................................................................................................................81
15.4 Update.....................................................................................................................81
15.4.1 Update()............................................................................................................81
15.4.2 Save()...............................................................................................................82
15.5 常用操作..................................................................................................................82
15.5.1 $inc...................................................................................................................82
15.5.2 $set...................................................................................................................83
15.5.3 $unset...............................................................................................................83
15.5.4 $push................................................................................................................84
15.5.5 $pushAll............................................................................................................86
15.5.6 $addToSet.........................................................................................................86
15.5.7 $pop..................................................................................................................88
15.5.8 $pull..................................................................................................................89
15.5.9 $pullAll..............................................................................................................91
15.5.10 $rename...........................................................................................................91
15.5.11 $bit....................................................................................................................91
15.6 特殊操作符:$.........................................................................................................92
4