mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
perf: schema indexes (#3446)
This commit is contained in:
@@ -79,8 +79,10 @@ const UserSchema = new Schema({
|
||||
|
||||
try {
|
||||
// login
|
||||
UserSchema.index({ username: 1, password: 1 });
|
||||
UserSchema.index({ createTime: -1 });
|
||||
UserSchema.index({ username: 1, password: 1 }, { background: true });
|
||||
|
||||
// Admin charts
|
||||
UserSchema.index({ createTime: -1 }, { background: true });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user