See also user_delete() performance: index comment uid columns. After addressing that indexing issue, I found dblog_user() taking up the bulk of my user_delete() time - indexing the {watchdog} uid column I went from 3900 users deleted in one batch to 12,086 in the next (with plentyy of time left for more - it finished the job in a tenth of the time it took for the 3900 previously).

CommentFileSizeAuthor
dblog.install.patch815 bytesmikeryan

Comments

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Believe it or not, this still works in 6.13.

gábor hojtsy’s picture

Version: 6.3 » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Changes are made to Drupal 7 first to ensure we do not introduce any (schema) regressions.

mikeryan’s picture

Version: 7.x-dev » 6.x-dev
Status: Patch (to be ported) » Reviewed & tested by the community

This has been done in Drupal 7.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs review

Can you please provide an issue URL where the change/commit is documented?

mikeryan’s picture

Status: Needs review » Closed (duplicate)

OK, tracked down the source of the fix: #324110: Missing index on uid... Closing this as a dupe of that, since that's where the D7 fix was committed.