Dramatically improves query times for site with 100,000+ users. Down from 7ms to 0.2ms as an example for me.

Comments

metzlerd’s picture

Adding an index is ok but adding a unique index is not something we should do. It is perfectly ok to have two CAS user names associated with the same drupal account.

dunx’s picture

Not in my use case, but of course a non-unique index is better than nothing.

bkosborne’s picture

Title: Add unique index on cas_user.uid column » Add index on cas_user.uid column

This would have to be added as non-unique, so adjusting title.

Note that in D8, it's already forced to be unique. We use the external auth module which enforces that. 1 CAS username = 1 Drupal username.

bkosborne’s picture

Version: 6.x-3.3 » 7.x-1.x-dev
apaderno’s picture

Issue tags: -performance database +Performance