aggregation optimization

This commit is contained in:
Emily
2024-09-02 18:36:52 +02:00
parent d499aa2f39
commit c003b655ec
6 changed files with 32 additions and 21 deletions

View File

@@ -15,7 +15,7 @@ const EventSchema = new Schema<TEvent>({
metadata: Schema.Types.Mixed,
session: { type: String },
flowHash: { type: String },
created_at: { type: Date, default: () => Date.now() },
created_at: { type: Date, default: () => Date.now(), index: true },
})
export const EventModel = model<TEvent>('events', EventSchema);