$ cat create_index.js
var testDB = db.getSisterDB('testDB');
testDB.testColl.createIndex({
"activityInstId" : 1
}, {"background":true});
testDB.testColl.createIndex({
"flowInstId" : 1
}, {"background":true});
testDB.testColl.createIndex({
"taskId" : 1
}, {"background":true});
testDB.testColl.createIndex({
"eid" : 1,
"timeout" : 1,
"flowStatus" : 1,
"overtime" : 1
}, {"background":true});
testDB.testColl.createIndex({
"handler" : 1,
"timeout" : 1
}, {"background":true});
testDB.testColl.createIndex({
"eid" : 1,
"handleTime" : 1,
"handlerOrgLongNum" : 1
}, {"background":true});
print('索引建立完成!');
网友评论