Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-18875

Push MIN() down to index

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 4.5.0
    • 4.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      SELECT MIN(expr) FROM ks WHERE cond;

      should be transformed and pushed down as follows:

      SELECT expr
      FROM ks
      WHERE cond AND expr IS NOT NULL
      ORDER BY expr
      LIMIT 1;

      If the push down is not possible, then the transformation should not be done, because the MIN() is more efficient than the ORDER BY.

      Attachments

        For Gerrit Dashboard: MB-18875
        # Subject Branch Project Status CR V

        Activity

          People

            gerald Gerald Sangudi (Inactive)
            gerald Gerald Sangudi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty