Skip to content

Add key to the Comment field of feedback_mri_comments to improve querying time #9800

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cmadjar
Copy link
Collaborator

@cmadjar cmadjar commented May 22, 2025

Brief summary of changes

Adding this index improved querying from 2 minutes to 3 seconds on the feedback_mri_comments on HBCD (which contains 12063735).

Testing instructions (if applicable)

  1. run the SQL patch and make sure the index was added to feedback_mri_comments
  2. source the default schema and make sure the index was created in feedback_mri_comments

@cmadjar cmadjar added Language: SQL PR or issue that update SQL code Beginner Friendly PR or Issue appears to be easy for someone to use to familiarize themselves with LORIS Category: Perfomance Issue or PR that aims to report or improve perfomance labels May 22, 2025
@driusan
Copy link
Collaborator

driusan commented Jul 9, 2025

@cmadjar This is failing when sourcing the schema because of the SQL error:

"ERROR 1170 (42000) at line 2265: BLOB/TEXT column 'Comment' used in key specification without a key length"

I'm not really sure why that's happening with the API tests and not the other ones, but it seems to be a real error and not a sporadic failure.

@driusan driusan assigned cmadjar and unassigned driusan Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beginner Friendly PR or Issue appears to be easy for someone to use to familiarize themselves with LORIS Category: Perfomance Issue or PR that aims to report or improve perfomance Language: SQL PR or issue that update SQL code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants