From abdb0c52d130a078f7544c487cfc7c52cc3102e1 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Sat, 14 Dec 2013 21:24:55 +0000 Subject: [PATCH] Issue #1790298 by nagba, pwolanin: Unindexed query in aggregator module. --- core/modules/aggregator/aggregator.install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/modules/aggregator/aggregator.install b/core/modules/aggregator/aggregator.install index 7c2ba739ee70..4c11c118e706 100644 --- a/core/modules/aggregator/aggregator.install +++ b/core/modules/aggregator/aggregator.install @@ -180,6 +180,7 @@ function aggregator_schema() { 'primary key' => array('iid'), 'indexes' => array( 'fid' => array('fid'), + 'timestamp' => array('timestamp'), ), 'foreign keys' => array( 'aggregator_feed' => array( @@ -231,3 +232,12 @@ function aggregator_update_8001() { 'initial' => Language::LANGCODE_NOT_SPECIFIED, )); } + +/** + * Add index on timestamp. + */ +function aggregator_update_8002() { + if (!db_index_exists('aggregator_item', 'timestamp')) { + db_add_index('aggregator_item', 'timestamp', array('timestamp')); + } +} -- GitLab