High db load with redirect module

Created on 23 June 2014, over 10 years ago
Updated 10 July 2023, over 1 year ago

This module's support for the redirect module in this code snippet from google_analytics_counter_get_sum_per_path():

    // Find possible redirects for this path using redirect_load_multiple() from module Redirect http://drupal.org/project/redirect
    if (function_exists('redirect_load_multiple')){
      //$sources = array();
      $redirectobjects = redirect_load_multiple(FALSE, array('redirect' => $path));
...

queries the redirect table on the redirect column.

Since looking up redirects by their path is not a common operation the redirect module has no index on this column.
#2194099: Create database index on the redirect column β†’

This has a significant performance impact on the database and site when you have a lot of nodes and a lot of redirects.

Can the functionality be achieved in a different matter?
Or maybe add an index to that column with hook_install() and hook_schema_alter() ?

✨ Feature request
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands JvE

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    Because of the Universal Analytics shutdown, version 7.x-3.x is no longer supported.
    As Drupal 7 EOL is close, please consider upgrading to the latest Drupal and latest version of this module with Google Analytics 4 support.
    If you are still here and experiencing problems with the latest version using GA4, then please open an issue about it.

Production build 0.71.5 2024