Skip to content
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

CommentID should be deprecated #9356

Open
driusan opened this issue Sep 24, 2024 · 0 comments
Open

CommentID should be deprecated #9356

driusan opened this issue Sep 24, 2024 · 0 comments
Assignees
Labels
Proposal PR or Issue suggesting an improvement that can be accepted, rejected or altered

Comments

@driusan
Copy link
Collaborator

driusan commented Sep 24, 2024

The flag table uses a varchar(255) called CommentID as a primary key. This makes for poor joins and excessively long table scans on large datasets. There is an autoincremented integer named ID on the flag table which should be used instead as the key in joins without any changes in user-facing functionality. However, the CommentID is referred to in many places in the code, so deprecating it may be tricky but will drastically improve the scaleability of LORIS.

I propose a phased approach.

  1. Update queries that use flag.CommentID in a join to use flag.ID instead (LORIS v27.0?) to improve join performance
  2. Move the CommentID to a separate flagid_commentid_rel table to improve table scans while maintaining the API places that use it in a request (v28.)
  3. Add support for using the FlagID instead of CommentID in those places (v28)
    3a. update LORIS frontend to pass FlagID instead of CommentID
    3b. Deprecate using CommentID
  4. Remove flagid_commentid_rel table (v29+)
@driusan driusan added the Proposal PR or Issue suggesting an improvement that can be accepted, rejected or altered label Sep 24, 2024
@driusan driusan moved this to Assigned in LORIS RoadMap Sep 24, 2024
@driusan driusan self-assigned this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal PR or Issue suggesting an improvement that can be accepted, rejected or altered
Projects
Status: Assigned
Development

No branches or pull requests

1 participant