mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
perf: schema indexes (#3446)
This commit is contained in:
@@ -98,6 +98,12 @@ try {
|
||||
ChatItemSchema.index({ time: -1, obj: 1 }, { background: true });
|
||||
// timer, clear history
|
||||
ChatItemSchema.index({ teamId: 1, time: -1 }, { background: true });
|
||||
|
||||
// Admin charts
|
||||
ChatItemSchema.index(
|
||||
{ obj: 1, time: -1 },
|
||||
{ background: true, partialFilterExpression: { obj: 'Human' } }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user