\Drupal\Core\Entity\Query\Sql\Tables causes extremely poor performance when using MariaDB and filtering on multiple relationships in JSON:API

Created on 28 December 2018, almost 6 years ago
Updated 26 July 2024, 4 months ago

After upgrading to 1.24 we've experienced server crashing performance issues with filters including multiple entity references. I've reduced an example request down to what seems to be a minimal set of filters that lead to a timed out response.

  ?filter[status][value]=1
  &filter[node--location][condition][path]=field_location.uuid
  &filter[node--location][condition][value][]=1c28abaa-f088-404f-925f-263838332601
  &filter[node--location][condition][operator]=IN
  &filter[taxonomy_term--audience][condition][path]=field_event_audience.uuid
  &filter[taxonomy_term--audience][condition][value][]=9422db2a-0071-4d3e-8b33-f3762c26fc19
  &filter[taxonomy_term--audience][condition][operator]=IN
  &filter[taxonomy_term--audience][condition][memberOf]=audience
  &filter[audience][group][conjunction]=OR
  &filter[parent][condition][path]=field_event_audience.parent.uuid
  &filter[parent][condition][value][]=9422db2a-0071-4d3e-8b33-f3762c26fc19
  &filter[parent][condition][operator]=IN
  &filter[parent][condition][memberOf]=audience

I haven't been able to test this with 2.x yet as we're relying on consumer_image_styles at the moment and it does not appear to be compatible with 2.x. That's the next step but wanted to report this in case anyone has other ideas in the meantime.

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated 2 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States pixelwhip

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

Not all content is available!

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

Production build 0.71.5 2024