Performance degradation after upgrading to 8.x-1.29

Created on 4 April 2023, over 1 year ago
Updated 22 May 2023, over 1 year ago

Upgrading from 8.x-1.28 to 8.x-1.29 using the MySQL backend causes a severe slowdown in performance due to the addition of a left outer join. It seems this was added in #2877319 ✨ Integrate database backend with Search API Location Fixed ?

8.x-1.28:

SELECT "t"."item_id" AS "item_id", SUM(t.score) AS "score"
FROM
(SELECT "t"."item_id" AS "item_id", SUM(t.score) AS "score", CASE WHEN t.word LIKE :like_w1 THEN 1 ELSE 0 END AS "w1"
FROM
{search_api_db_atlas_text} "t"
WHERE ("t"."word" LIKE :db_condition_placeholder_1 ESCAPE '\\') AND ("t"."field_name" IN (:db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9, :db_condition_placeholder_10, :db_condition_placeholder_11, :db_condition_placeholder_12, :db_condition_placeholder_13, :db_condition_placeholder_14, :db_condition_placeholder_15, :db_condition_placeholder_16, :db_condition_placeholder_17, :db_condition_placeholder_18, :db_condition_placeholder_19, :db_condition_placeholder_20, :db_condition_placeholder_21, :db_condition_placeholder_22, :db_condition_placeholder_23, :db_condition_placeholder_24, :db_condition_placeholder_25, :db_condition_placeholder_26))
GROUP BY "t"."item_id", "w1") "t"
LEFT OUTER JOIN {search_api_db_atlas_mist_platform__access_policy} "t_2" ON t.item_id = t_2.item_id
WHERE "t_2"."value" = :db_condition_placeholder_0
GROUP BY "t"."item_id"

8.x-1.29:

SELECT "t"."item_id" AS "item_id", SUM([t].[score]) AS "score"
FROM
(SELECT "t"."item_id" AS "item_id", SUM([t].[score]) AS "score", CASE WHEN [t].[word] LIKE :like_w1 THEN 1 ELSE 0 END AS "w1"
FROM
{search_api_db_atlas_text} "t"
WHERE ("t"."word" LIKE :db_condition_placeholder_1 ESCAPE '\\') AND ("t"."field_name" IN (:db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9, :db_condition_placeholder_10, :db_condition_placeholder_11, :db_condition_placeholder_12, :db_condition_placeholder_13, :db_condition_placeholder_14, :db_condition_placeholder_15, :db_condition_placeholder_16, :db_condition_placeholder_17, :db_condition_placeholder_18, :db_condition_placeholder_19, :db_condition_placeholder_20, :db_condition_placeholder_21, :db_condition_placeholder_22, :db_condition_placeholder_23, :db_condition_placeholder_24, :db_condition_placeholder_25, :db_condition_placeholder_26))
GROUP BY "t"."item_id", "w1") "t"
LEFT OUTER JOIN {search_api_db_atlas} "t_2" ON t.item_id = t_2.item_id
LEFT OUTER JOIN {search_api_db_atlas_mist_platform__access_policy} "t_3" ON t.item_id = t_3.item_id
WHERE "t_3"."value" = :db_condition_placeholder_0
GROUP BY "t"."item_id"
πŸ› Bug report
Status

Fixed

Version

1.0

Component

Database backend

Created by

πŸ‡§πŸ‡ͺBelgium Bart Vanhoutte

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024