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() ?

Comments

vacilando’s picture

Status: Active » Needs review

There's a patch ready over at #2194099: Create database index on the redirect column; please help by reviewing it — it will solve this issue as well.

kaszarobert’s picture

Status: Needs review » Closed (outdated)

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.