Changing analytics.log.event indexes to compound

Changing this back.  Using mongodb hint() and explain() on our find()
call indicates the compound index is better than the two single indexes.
This commit is contained in:
Matt Lott 2015-01-06 14:54:56 -08:00
parent a144c5ff0d
commit 1c1f2be497

View file

@ -6,7 +6,6 @@ AnalyticsLogEventSchema = new mongoose.Schema({
type: Date
'default': Date.now
}, {strict: false})
AnalyticsLogEventSchema.index event: 1
AnalyticsLogEventSchema.index created: -1
AnalyticsLogEventSchema.index({event: 1, created: -1})
module.exports = AnalyticsLogEvent = mongoose.model('analytics.log.event', AnalyticsLogEventSchema)