In the user_relationships_update_5() function, the 'INSERT INTO ...' statement happens early in the function, before several table manipulation statements. I recommend moving the 'INSERT INTO ...' to the end of the list of queries.
As a point of reference, we ran tests with ~500,000 relationships (before the update). Executing the SQL statements associated with update_5, in the original order, took about 92 seconds. When we moved the INSERT to the end, they took only 58 seconds. That's a noticeable improvement, and every little bit helps when your site is down for maintenance.
Comments
Comment #1
prfctns6@gmail.com commentedI committed this change in cvs revision 1.6.4.6, which you should get if you checkout/update branch DRUPAL-5--2.
While I was at it, I fixed a missing semicolon and a mismatched function name/call.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.