mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
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:
parent
a144c5ff0d
commit
1c1f2be497
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue