Skip to content

Commit

Permalink
fix: consent cockroachdb perfomance issue with zigzag join query (#1790)
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 authored May 22, 2020
1 parent 5661ec3 commit 615387e
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 615387e

Please sign in to comment.