Closed (outdated)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2012 at 04:36 UTC
Updated:
9 Feb 2026 at 17:41 UTC
Jump to comment: Most recent
In troubleshooting CPU usage of over 300% on my cloud server, I noticed the same query to look up entity_id with only a GUID from feeds_item table but no usable index.
Here is the index needed
ALTER TABLE {feeds_item} ADD UNIQUE `guid_entity_id` ( `guid` ( 15 ) , `entity_id` )
This is probably best added manually rather than managed by the module since the size of the guid must be specified, and the smaller the better for index performance.
Comments
Comment #1
mgiffordShould this be added to the README so that others can benefit it?
Where would you point somone for the best docs on how low you can go?
Comment #2
davemaxg commentedNot sure why I didn't respond to this. I probably thought it was for the maintainer. Anyway, it would depend on how your GUIDs are constructed which depends on your application itself. The shorter your GUIDs, the lower the number. If your guids get more unique as they get longer such as
20140620-1400-12345 (YYYYMMDD-HHMM-ID) then you'd want to make sure you capture all the uniqueness in the index otherwise it will cause database errors.
Comment #3
twistor commentedCould someone tell me what query, specifically, is causing this problem?
Comment #4
davemaxg commentedThis was almost two years ago, but I believe it was the query that looks up entityID by guid probably for node reference lookups rather than updating existing entities. That being said, I think this index, if incorporated into feeds, should work for both lookups and entity updates. GUID lookups are integral to the module so we really need an index there.
The application that I'm using feeds on has millions of nodes which I've found is not the norm for most Drupal sites. We've come across a few issues here and there that are unique to this use case. This is definitely one of them.
Thanks for working on feeds, it's awesome!
Comment #5
bluegeek9 commentedDrupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.
If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.
If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!