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 db index for MessageModel and PVModel #420

Merged
merged 1 commit into from
Feb 6, 2023
Merged

Conversation

Bill-Becker
Copy link
Collaborator

@Bill-Becker Bill-Becker commented Feb 6, 2023

This is the SQL translated from django's migration file for the two db tables:

BEGIN;
--
-- Alter index_together for messagemodel (1 constraint(s))
--
CREATE INDEX "reo_messagemodel_run_uuid_f98c3013_idx" ON "reo_messagemodel" ("run_uuid");
--
-- Alter index_together for pvmodel (1 constraint(s))
--
CREATE INDEX "reo_pvmodel_run_uuid_ffc792f5_idx" ON "reo_pvmodel" ("run_uuid");
COMMIT;

@Bill-Becker Bill-Becker requested a review from GUI February 6, 2023 20:41
Copy link
Member

@GUI GUI left a comment

Choose a reason for hiding this comment

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

I'm obviously not super familiar with the Django side of this, but that SQL looks right, so this looks good to me, and I think these indices will help with some of the production load. Thanks!

@Bill-Becker Bill-Becker merged commit 744a69b into master Feb 6, 2023
@Bill-Becker Bill-Becker deleted the add-db-index branch February 6, 2023 20:53
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.

2 participants