[MDEV-40] Re-engineer the code for loose scan for GROUP BY Created: 2012-01-04  Updated: 2015-10-30

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Rasmus Johansson (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: optimizer


 Description   
  • Reuse the range optimization code.
  • Reuse existing interfaces to iterate over keyparts and indexes.
  • Lift the limitation introduced by mdev-4140 where expensive constant
    subqueries result in rejecting loose scan because they are not evaluated
    during optimization. This can be fixed by delayed evaluation of the
    such constant subqueries during the startup execution phase. In this
    case the range optimizer will not build a range tree, but we could do
    this separately during the execution startup phase.
    A comment from Igor on the fix of MDEV-4140:
    "Yet remember that this fix leads us to a performance regression
    5.2 >> 5.3 when the range expression contains a constant [single-row]
    subquery.

This is due to the changes when and how we build range trees in 5.3.
When we have a range expression with constant expensive subquery we
just bail out and do not include this range into the range condition at all.

The worst thing about this is that we bail out even for dynamic ranges
belonging to te range trees that are build at the execution time when
subquery evaluation is allowed."


Generated at Thu Feb 08 06:25:51 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.