Permalink
Browse files

Limiting the result to any entity_type = taxonomy_term improves perfo…

…rmance significantly.
  • Loading branch information...
Alex Barth
Alex Barth committed Jan 11, 2011
1 parent c6c557b commit fe2e256991c55fc2758a4440bba7d1be83e75f49
Showing with 1 addition and 0 deletions.
  1. +1 −0 legacy_reference.module
View
@@ -99,6 +99,7 @@ function legacy_reference_look_up_tids($legacy_id) {
if (!empty($legacy_id)) {
$results = db_select('feeds_item')
->fields('feeds_item', array('entity_id'))
+ ->condition('entity_type', 'taxonomy_term', '=')
->condition('guid', $legacy_id, '=')
->execute()
->fetchAll();

0 comments on commit fe2e256

Please sign in to comment.