You are here

function linkchecker_update_7008 in Link checker 7

Issue #965720: Add indexes to improve performance of views queries.

File

./linkchecker.install, line 419
Installation file for Link Checker module.

Code

function linkchecker_update_7008() {
  db_drop_index('linkchecker_link', 'method');
  db_drop_index('linkchecker_link', 'code');
  db_drop_index('linkchecker_link', 'fail_count');
  db_drop_index('linkchecker_link', 'last_checked');
  db_drop_index('linkchecker_link', 'status');
  db_add_index('linkchecker_link', 'method', array(
    'method',
  ));
  db_add_index('linkchecker_link', 'code', array(
    'code',
  ));
  db_add_index('linkchecker_link', 'fail_count', array(
    'fail_count',
  ));
  db_add_index('linkchecker_link', 'last_checked', array(
    'last_checked',
  ));
  db_add_index('linkchecker_link', 'status', array(
    'status',
  ));
  return t('Added indexes to linkchecker_link database table.');
}