[MDEV-26856] Queries with many NOT IN clauses or ORs use a lot of memory Created: 2021-10-19 Updated: 2023-11-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | optimizer, range-optimizer | ||
| Issue Links: |
|
||||||||
| Description |
|
This is a followup to For certain WHERE clauses, range optimizer may consume O(N^2) memory. The cause of this is that tree_or() allocates its result on MEM_ROOT, while the arguments also remain allocated on MEM_ROOT (See
|