The admin/user/user page shows a pageable, sortable table of all users. However, for the users.created column, there is no database index. The resulting queries require a full table sort to perform, so on a site like drupal.org that page can take ages to load (and users.created is the default sort order!). This is easily verified with an EXPLAIN query.
The attached patch adds an index on users.created and contains an update for existing installs.
Because this is a rather serious 5.0 performance issue for that page, it should be backported (so that drupal.org can use it, for example).
The attached patch is for HEAD, but also includes an update for 5.0. I created a "5.x extra updates" section in system.install which starts at the same number where "4.7 to 5.0" left off. The "5.x extra" update sets a variable which is checked by the HEAD update to avoid performing the queries twice when 5.x users finally update to 6.x.
The 5.x version of this patch is below and only includes the 5.x update.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | users_created_5.patch | 1.74 KB | Steven |
| users_created_head.patch | 2.46 KB | Steven |
Comments
Comment #1
Steven commented5.x
Comment #2
killes@www.drop.org commentedMakes sense to me. Didn't try to run the code, yet.
Comment #3
dries commentedThis looks good to me. Feel free to commit.
Comment #4
Steven commentedCommitted to HEAD and 5.
Comment #5
(not verified) commented