记得上下班打卡 | git大法好,push需谨慎

Commit 584e4a4a authored by 胡佳晨's avatar 胡佳晨

提交 mongo 索引分片

parent b698b20d
......@@ -20,6 +20,14 @@ db.createCollection("GoblinFrontNavigation");
db.createCollection("GoblinFrontSeckill");
db.createCollection("GoblinFrontSelectGoods");
db.createCollection("GoblinShoppingCartVoo");
db.createCollection("GoblinBackOrderVo");
db.createCollection("GoblinMailVo");
db.createCollection("GoblinMarketingZhengzaiRelationVo");
db.createCollection("GoblinOrderLogVo");
db.createCollection("GoblinOrderSkuVo");
db.createCollection("GoblinSelfMarketingVo");
db.createCollection("GoblinStoreOrderVo");
// ================================================== 创建分片
sh.enableSharding("dev_ln_scene");
sh.shardCollection("dev_ln_scene.GoblinSelfGoodsCategoryVo",{"cateId":"hashed"});
......@@ -42,6 +50,13 @@ sh.shardCollection("dev_ln_scene.GoblinFrontNavigation",{"navigationId":"hashed"
sh.shardCollection("dev_ln_scene.GoblinFrontSeckill",{"seckilId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinFrontSelectGoods",{"selectGoodsId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinShoppingCartVoo",{"goblinShoppingCartId":"hashed"});
sh.createCollection("dev_ln_scene.GoblinBackOrderVo",{"backOrderId":"hashed"});
sh.createCollection("dev_ln_scene.GoblinMailVo",{"mailId":"hashed"});
sh.createCollection("dev_ln_scene.GoblinMarketingZhengzaiRelationVo",{"selfMarketId":"hashed"});
sh.createCollection("dev_ln_scene.GoblinOrderLogVo",{"selfMarketId":"hashed"});
sh.createCollection("dev_ln_scene.GoblinOrderSkuVo",{"selfMarketId":"hashed"});
sh.createCollection("dev_ln_scene.GoblinStoreOrderVo",{"orderId":"hashed"});
// ================================================== 创建索引
db.GoblinStoreGoodsCategoryVo.createIndex({storeId:"hashed"});
db.GoblinMgtCategorySpecVo.createIndex({cateId:"hashed"});
......@@ -64,4 +79,23 @@ db.GoblinFrontMoudleIndex.createIndex({moudleIndexId:"hashed"});
db.GoblinFrontNavigation.createIndex({navigationId:"hashed"});
db.GoblinFrontSeckill.createIndex({seckilId:"hashed"});
db.GoblinFrontSelectGoods.createIndex({selectGoodsId:"hashed"});
db.GoblinShoppingCartVoo.createIndex({goblinShoppingCartId:"hashed"});
\ No newline at end of file
db.GoblinShoppingCartVoo.createIndex({goblinShoppingCartId:"hashed"});
db.GoblinBackOrderVo.createIndex({backOrderId:"hashed"});
db.GoblinBackOrderVo.createIndex({orderId:"hashed"});
db.GoblinMailVo.createIndex({mailId:"hashed"});
db.GoblinMailVo.createIndex({orderId:"hashed"});
db.GoblinMarketingZhengzaiRelationVo.createIndex({selfMarketId:"hashed"});
db.GoblinMarketingZhengzaiRelationVo.createIndex({storeId:"hashed"});
db.GoblinOrderLogVo.createIndex({orderId:"hashed"});
db.GoblinOrderLogVo.createIndex({spuId:"hashed"});
db.GoblinOrderLogVo.createIndex({skuId:"hashed"});
db.GoblinOrderLogVo.createIndex({status:"hashed"});
db.GoblinOrderSkuVo.createIndex({orderSkuId:"hashed"});
db.GoblinOrderSkuVo.createIndex({orderId:"hashed"});
db.GoblinSelfMarketingVo.createIndex({selfMarketId:"hashed"});
db.GoblinSelfMarketingVo.createIndex({performanceId:"hashed"});
db.GoblinStoreOrderVo.createIndex({orderId:"hashed"});
db.GoblinStoreOrderVo.createIndex({storeId:"hashed"});
db.GoblinStoreOrderVo.createIndex({status:"hashed"});
db.GoblinStoreOrderVo.createIndex({orderCode:"hashed"});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment