-
Notifications
You must be signed in to change notification settings - Fork 9
Performance tweaks for large account in prod #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @@ -0,0 +1,3 @@ | |||
| -- Add a composite index to speed up paginated lookups by review item | |||
| CREATE INDEX IF NOT EXISTS "reviewItemComment_reviewItemId_sortOrder_id_idx" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[performance]
Consider verifying that the order of columns in the composite index aligns with the query patterns used in the application. The order can significantly impact the performance of the index.
kkartunov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
…t from legacy data
| @@ -0,0 +1,3 @@ | |||
| -- Add isFileSubmission flag to submissions to differentiate file vs URL entries | |||
| ALTER TABLE "submission" | |||
| ADD COLUMN IF NOT EXISTS "isFileSubmission" BOOLEAN NOT NULL DEFAULT false; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[performance]
Consider adding an index on the isFileSubmission column if this field will be frequently queried or filtered on. This can improve query performance, especially on large datasets.
| @UploadedFile() file: Express.Multer.File, | ||
| @Body() body: SubmissionRequestDto, | ||
| ): Promise<SubmissionResponseDto> { | ||
| console.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[maintainability]
Using console.log for logging is not recommended in production code. Consider using the LoggerService for consistent logging and to take advantage of any logging infrastructure in place.
No description provided.