Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4120

UNIQUE indexes should not be considered for loose index scan

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 10.0.5
    • Component/s: None
    • Labels:
      None

      Description

      Currently the loose scan code in opt_range.cc considers all indexes as possible for the access method. Due to inexact statistics it may happen that a loose scan is selected over a unique index.

      This is clearly wrong since a "loose scan" over a unique index will read the same keys as a direct index scan, but the loose scan has more overhead.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              timour Timour Katchaounov added a comment -

              Assigned to SergeyP for review.

              Show
              timour Timour Katchaounov added a comment - Assigned to SergeyP for review.
              Hide
              psergey Sergei Petrunia added a comment -

              Patch approved with comments (see email)

              Show
              psergey Sergei Petrunia added a comment - Patch approved with comments (see email)

                People

                • Assignee:
                  timour Timour Katchaounov
                  Reporter:
                  timour Timour Katchaounov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 day
                    1d
                    Remaining:
                    Time Spent - 2 hours Remaining Estimate - 6 hours
                    6h
                    Logged:
                    Time Spent - 2 hours Remaining Estimate - 6 hours
                    2h