You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we are replacing the existing identifies and auth methods of an account with the incoming identities by deleting all identities of the account and re-insert the new identities, which can be optimized.
For example,
If the original identities are the following
should only involve one insertion to the auth_methods table (email, user1@example) as opposed to remove the existing 1 identity and 2 auth methods and insert 1 identity and 3 auth methods.
However given that the expected use cases currently only involves a small number of identities and auth methods, replacing one set with another isn't that costly.
Note that we can't really use UPDATE statement because there could be more than one rows with the same auth_method_type, account_id, identity_id. This means that changing an auth value requires a DELETE statement and an INSERT statement.
Constructing a delta set for this operation can only benefit some of the cases and is not straightforward to get right. Thus we are deferring this optimization.
The text was updated successfully, but these errors were encountered:
Why
Right now we are replacing the existing identifies and auth methods of an account with the incoming identities by deleting all identities of the account and re-insert the new identities, which can be optimized.
For example,
If the original identities are the following
updating it to become
should only involve one insertion to the
auth_methods
table (email, user1@example) as opposed to remove the existing 1 identity and 2 auth methods and insert 1 identity and 3 auth methods.However given that the expected use cases currently only involves a small number of identities and auth methods, replacing one set with another isn't that costly.
Note that we can't really use UPDATE statement because there could be more than one rows with the same
auth_method_type
,account_id
,identity_id
. This means that changing an auth value requires a DELETE statement and an INSERT statement.Constructing a delta set for this operation can only benefit some of the cases and is not straightforward to get right. Thus we are deferring this optimization.
The text was updated successfully, but these errors were encountered: