Skip to content

Commit

Permalink
fix: consent cockroachdb perfomance issue with zigzag join query
Browse files Browse the repository at this point in the history
Add an index over subject and client_id in order to avoid the
(sometimes) underperformant zigzag join query.

Closes #1789
Related to #1755 cockroachdb/cockroach#47179
  • Loading branch information
lopezator committed May 7, 2020
1 parent 697b0f5 commit a6d2106
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP INDEX hydra_oauth2_consent_request@hydra_oauth2_consent_request_client_id_subject_idx;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX hydra_oauth2_consent_request_client_id_subject_idx ON hydra_oauth2_consent_request (client_id, subject);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP INDEX hydra_oauth2_consent_request ON hydra_oauth2_consent_request_client_id_subject_idx;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX hydra_oauth2_consent_request_client_id_subject_idx ON hydra_oauth2_consent_request (client_id, subject);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP INDEX hydra_oauth2_consent_request_client_id_subject_idx;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX hydra_oauth2_consent_request_client_id_subject_idx ON hydra_oauth2_consent_request (client_id, subject);

0 comments on commit a6d2106

Please sign in to comment.