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

Add index on ObjectChange -time #3410

Closed
lampwins opened this issue Mar 10, 2023 · 1 comment · Fixed by #3414
Closed

Add index on ObjectChange -time #3410

lampwins opened this issue Mar 10, 2023 · 1 comment · Fixed by #3414
Assignees
Labels
type: feature Introduction of new or enhanced functionality to the application

Comments

@lampwins
Copy link
Member

lampwins commented Mar 10, 2023

As ...

Patti - Platform Admin

I want ...

A DB index to be created on ObjectChange -time

So that ...

The query used to used on the home page to find the 15 most recent records is optimized and does not take an inordinate amount of time to process, with large ObjectChange datasets.

I know this is done when...

  • The homepage loads quickly with 1 million+ object change records

Optional - Feature groups this request pertains to.

Database Changes

  • Add index ObjectChange -time

External Dependencies

No response

@lampwins lampwins added the type: feature Introduction of new or enhanced functionality to the application label Mar 10, 2023
@lampwins
Copy link
Member Author

Durring analysis, it is likely also worth removing the join on the user table, since ObjectChnage already caches the user_name locally to cover cases where the user is deleted later.

bryanculver added a commit that referenced this issue Mar 10, 2023
- Add -time index for ObjectChange because we typically lookup records by newest first
- Use cached user name on record instead of str(User)
- Stop joining User table to ObjectChange records for the homepage query of 15 latest changes

Close #3410
@bryanculver bryanculver self-assigned this Mar 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new or enhanced functionality to the application
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants