Closed (fixed)
Project:
Redirect
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2014 at 01:20 UTC
Updated:
20 Mar 2020 at 11:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidI don't know off-hand what would need to query on the redirect field, but I don't think it happens that often (the condition for looking up based on the source column is in fact indexed currently)? That almost sounds like an entity field query.
Comment #2
JvE commentedI'm also seeing this non-stop on my new site's production databases processlist:
with the nid constantly changing.
I tracked down the source being the google_analytics_counter module.
I'll go add an index.
Comment #3
vacilando commented@Dave Reid, did the info by JvE help? The index would really be helpful.
Comment #4
vacilando commentedAttaching a patch that adds the index for new as well as existing installs; please review and commit. Thanks!
Comment #5
rp7 commentedPatch in #4 works.
Tested on a clean Drupal install. Both on installation, and update. Against 7.x-1.0-rc1+8-dev.
Comment #6
nicrodgersPatch 4 looks good to me
Comment #7
nicrodgersComment #10
vacilando commentedUpdated patch attached.
Comment #11
vacilando commentedSimpleTest OK this time; setting the status back to RTBC.
Comment #12
dave reidThe latest patch is missing the index definition in redirect_schema() so this index will not be created for new sites.
Comment #13
vacilando commentedOh, indeed, it fell through the cracks when updating the patch.
Line added back to redirect_schema() now — see the new patch.
Comment #14
danquah commented+1 on the "Reviewed & tested by the community" - I just applied the patch and ran the update-hook on a quite large site that has 800.000+ redirects. It sped up redirect_field_attach_form() by about 500ms and applying the update-hook took about 10 seconds.
Comment #15
pifagorRTBC
Comment #16
alex_optimLooks good.
Comment #17
pifagorComment #20
pifagorComment #22
ciss commented@pifagor You accidentally committed the patch in #10 instead of #13. The former is missing the index definition in the schema.
Comment #23
pifagorComment #26
pifagor@ciss, thanks
Comment #27
pifagorComment #28
jackfoust commentedThis change does not appear to work with Pantheon and Drupal 7 without converting to UTF8MB4.
Comment #30
hargobindI just upgraded to the latest 1.x-dev version (26-Jan-2020) on a non-utf8mb4 site and did not run into any errors.
@jackfoust Were you using 1.x or 2.x when you tried updating on your Pantheon site? What errors did you get?
I don't run Pantheon, so I can't test this myself. But given that it's a widely used platform, I think it's worth finding someone to run a few tests on a Pantheon installation and see what they come up with.
Comment #31
pifagorSome info here - https://www.drupal.org/project/redirect/issues/2815099