mongoqueue icon indicating copy to clipboard operation
mongoqueue copied to clipboard

Should add some indexs to speed up

Open kunzhipeng opened this issue 6 years ago • 0 comments

It's very slow when pull tasks via next(), finally i find there is no any index. After i added following indexs, it's fast now. collection.ensure_index([('priority', ASCENDING)]) collection.ensure_index([('locked_by', ASCENDING), ('locked_at', ASCENDING), ('attempts', ASCENDING)]) collection.ensure_index([('_id', ASCENDING), ('locked_by', ASCENDING)])

kunzhipeng avatar Jul 25 '18 07:07 kunzhipeng