Mongodb在renameCollection之后,记得千万要立即补建索引.

mongodb执行完renameCollection之后,记得千万要立即建索引.

 

因为mongodb的新insert语句只负责create collections,不负责create index, 如果在production上面, 记得提前写好collection的indexes, rename之后重新补上.

 

否则应用access会变得very slow very slow !

你可能感兴趣的:(Mongodb在renameCollection之后,记得千万要立即补建索引.)