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 indexes on core job #619

Merged
merged 1 commit into from
Apr 22, 2023
Merged

Add indexes on core job #619

merged 1 commit into from
Apr 22, 2023

Conversation

m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented Apr 20, 2023

Make things faster

)
output = models.TextField(null=True)
feedback = JSONField(null=True)
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
created_at = models.DateTimeField(auto_now_add=True)
created_at = models.DateTimeField(auto_now_add=True, db_index=True)
updated_at = models.DateTimeField(auto_now=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-kuhn could you also index the updated_at as it is the order by field in the admin list display?

#QF-2613

@suricactus I did not find anything remarkable or easy to improve on JobAdmin . The DeltaAdmin looks quite similar (same Joins) and has much faster list_display. Thinks it's just because it has an index on updated_at. Both get ordered after -updated_at.

#QF-2650

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@m-kuhn m-kuhn merged commit dd092d6 into master Apr 22, 2023
4 checks passed
@m-kuhn m-kuhn deleted the add-job-indexes branch April 22, 2023 10:19
@suricactus
Copy link
Collaborator

LGTM too, thank you both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants