Performance - slow mysql queries caused by use of TEXT type for policy column
| Project: | Password policy |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
password_policy makes use of the mysql TEXT column type on the 'policy' database column. Because of this, database lookups that include the password_policy table are unable to use MySQL's in memory temporary tables due to the inclusion of a TEXT field, and so temporary tables must be created on disk for each of these lookups. This results in a considerable performance issue as on-disk temporary tables can have a massive effect on performance. I don't see any need for this column to be of type TEXT. Wouldn't a varchar(255) suffice? As far as I can tell, you are only storing serialised settings data in there - that shouldn't be too large (my policy certainly takes up less than 255 characters)
Please consider changing this column to varchar which will allow MySQL to make proper use of indexes and in memory temporary tables.
