We should _never_ have queries like this one:

$result = db_query("SELECT n.nid FROM {node} n JOIN {feedapi_node_item_feed} ff ON ff.feed_item_nid = n.nid WHERE ff.feed_nid = %d ORDER BY n.created DESC", $feed->nid);

In a large database, this would fetch all feed item nodes there are only to promote/demote some of them. I don't know whether or how we could fix this. If this is not fixable in a quick way, I would argue to drop this feature from FeedAPI.

IMO, this feature should be implemented with workflow or similar modules.

CommentFileSizeAuthor
#1 promote.patch1.46 KBaron novak

Comments

aron novak’s picture

Assigned: Unassigned » aron novak
StatusFileSize
new1.46 KB

Of course, this can be implemented to be faster. Here is a patch for Drupal 6, but i assume this patch can be applied without change to Drupal 5. It only queries the currently promoted and the to-be-promoted nids.

aron novak’s picture

Status: Active » Needs review
aron novak’s picture

Status: Needs review » Fixed

A more efficient version is committed (never query all of the nids). Maybe it'd be better to drop the feature. Decide about it later.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.