[MDEV-24173] After minor upgrade to 10.2.35 queries with large IN clauses have performance issues Created: 2020-11-09  Updated: 2021-12-29  Resolved: 2020-11-09

Status: Closed
Project: MariaDB Server
Component/s: Optimizer, Server
Affects Version/s: 10.2.35
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Aitor Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: innodb, performance
Environment:

Centos 7.8


Attachments: File query.sql    
Issue Links:
Blocks
is blocked by MDEV-27380 After minor upgrade to 10.5.13 querie... Closed
Duplicate
duplicates MDEV-24117 Memory management problem in statisti... Closed

 Description   

Since upgrading from 10.2.34 to 10.2.35 queries using IN clauses with many values have performance issues.

For example, a query like this one but with many different values on the last IN clause:

select distinct record from redcap_record_list where project_id = 128 and dag_id in ('2080') and record in ('1', '7') order by sort;

Takes 0.2 seconds on 10.2.34 and more than 100 seconds on 10.2.35 . It also allocates a lot of RAM on 10.2.35 ( more than 3 GB ) while on 10.2.34 does not seem to.

The table engine is InnoDB. Same happens with query cache enabled or disabled. Configuration is the same on both versions.

Same issue happens on all upgraded servers, on different applications, with different queries, ...

It's not PHP version dependant, same issue happens when running queries from "mysql command" on CLI.

Issue is resolved if downgrading to 10.2.34

I am attaching the complete query extracted from slow query log.



 Comments   
Comment by Frank Sagurna [ 2020-11-09 ]

Maybe related to https://jira.mariadb.org/browse/MDEV-24117

Comment by Alice Sherepa [ 2020-11-09 ]

Thanks! You are right, the same problem as MDEV-24117, let's track it there

Generated at Thu Feb 08 09:27:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.