p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
Other
361 stars 65 forks source link

adds user_id index to organization members table #243

Closed richardalberto closed 3 weeks ago

richardalberto commented 3 weeks ago

As the number of organization members increases we've noticed the get member routines could benefit from an index.

Example Query:

SELECT `ome1_0` . `ID` , `ome1_0` . `CREATED_AT` , `ome1_0` . `ORGANIZATION_ID` , `ome1_0` . `USER_ID` FROM `ORGANIZATION_MEMBER` `ome1_0` WHERE `ome1_0` . `USER_ID` = ?