diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install index 57ae17e4be474be71a8f864468549e06320c4084..c2d58c7596c9d6b1010f976f490bae8199abf9e8 100644 --- a/modules/taxonomy/taxonomy.install +++ b/modules/taxonomy/taxonomy.install @@ -72,6 +72,7 @@ function taxonomy_schema() { 'indexes' => array( 'taxonomy_tree' => array('vid', 'weight', 'name'), 'vid_name' => array('vid', 'name'), + 'name' => array('name'), ), ); @@ -429,3 +430,10 @@ function taxonomy_update_7006() { )); } +/** + * Add index on taxonomy_term_data.name column to speed up taxonomy_get_term_by_name(). + */ +function taxonomy_update_7007() { + db_add_index('taxonomy_term_data', 'name', array('name')); +} +