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

Optimize MIN aggregate without group by when KeyPos > 0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.5.0
    • 6.5.0
    • secondary-index
    • None
    • Untriaged
    • No

    Description

      This is an extension of Bug MB-27861 to optimize MIN aggregate without GROUP BY. As of vulcan, we want to handle optimization only for keyPos = 0 to avoid corner cases and regressions. It would be good to do the full optimization for KeyPos > 0 in mad-hatter.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            prathibha Prathibha Bisarahalli (Inactive) created issue -
            jeelan.poola Jeelan Poola made changes -
            Field Original Value New Value
            Link This issue relates to MB-30871 [ MB-30871 ]
            jeelan.poola Jeelan Poola made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

            Build couchbase-server-6.5.0-4156 contains indexing commit 732b0f2 with commit message:
            MB-29605: Optimize MIN aggregate without group by when KeyPos > 0

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-4156 contains indexing commit 732b0f2 with commit message: MB-29605 : Optimize MIN aggregate without group by when KeyPos > 0

            Prathibha Bisarahalli Is QE Verification needed on this bug? If yes, pls provide more details for verification of the issue, and remove the request-dev-verify label on this issue.

            mihir.kamdar Mihir Kamdar (Inactive) added a comment - Prathibha Bisarahalli Is QE Verification needed on this bug? If yes, pls provide more details for verification of the issue, and remove the request-dev-verify label on this issue.
            mihir.kamdar Mihir Kamdar (Inactive) made changes -
            Labels request-dev-verify
            prathibha Prathibha Bisarahalli (Inactive) made changes -
            Description This is an extension of Bug MB-27861 to optimize MIN aggregate with GROUP BY. As of vulcan, we want to handle optimization only for keyPos = 0 to avoid corner cases and regressions. It would be good to do the full optimization for KeyPos > 0 in mad-hatter. This is an extension of Bug MB-27861 to optimize MIN aggregate without GROUP BY. As of vulcan, we want to handle optimization only for keyPos = 0 to avoid corner cases and regressions. It would be good to do the full optimization for KeyPos > 0 in mad-hatter.

            Mihir Kamdar - Yes. Although this is just an optimization task, it would be good to add additional tests for this scenario.
            Details about change: If there is scan with MIN aggregate (with no group by) and if keyPos of aggregate can be anything (first or otherwise), we have optimized the scanning to pick first result that is returned instead of scanning all rows and pick minimum (since minimum value will always be the first). The same optimization is applicable to MAX where desc is true for MAX position.

            For verification purposes, please test out scenarios involving MIN aggregates on various key positions without any group by.

            prathibha Prathibha Bisarahalli (Inactive) added a comment - Mihir Kamdar - Yes. Although this is just an optimization task, it would be good to add additional tests for this scenario. Details about change: If there is scan with MIN aggregate (with no group by) and if keyPos of aggregate can be anything (first or otherwise), we have optimized the scanning to pick first result that is returned instead of scanning all rows and pick minimum (since minimum value will always be the first). The same optimization is applicable to MAX where desc is true for MAX position. For verification purposes, please test out scenarios involving MIN aggregates on various key positions without any group by.
            prathibha Prathibha Bisarahalli (Inactive) made changes -
            Labels request-dev-verify
            mihir.kamdar Mihir Kamdar (Inactive) made changes -
            Assignee Prathibha Bisarahalli [ prathibha ] Girish Benakappa [ girish.benakappa ]

            Verified for regressions with aggregate queries (MIN and MAX) with keyPos of aggregate 0,1,2. No issues seen. Hence closing this issue.

            Verified with 6.5.0-4846

            girish.benakappa Girish Benakappa added a comment - Verified for regressions with aggregate queries (MIN and MAX) with keyPos of aggregate 0,1,2. No issues seen. Hence closing this issue. Verified with 6.5.0-4846
            girish.benakappa Girish Benakappa made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              girish.benakappa Girish Benakappa
              prathibha Prathibha Bisarahalli (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty