Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2360

Allow disjunctions and combinations of operations in join cursors

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • WT2.9.0
    • None
    • None

    Description

      Hi!
      We have cases when queries to storage looks like next:

      tbl.x > X1 AND tbl.y == Y1 AND (tbl.z == Z1 || tbl.z == Z2)
      

      Where for all conditions exists indexes (tbl_index_x, tbl_index_y, tbl_index_z) and order of results is important, it should be ordered by tbl_index_x (first condition tbl.x > X1). Right now, we will transform queries to disjunction of conjunction

      (tbl.x > X1 AND tbl.y == Y1 AND tbl.z == Z1) OR (tbl.x > X1 AND tbl.y == Y1 AND tbl.z == Z2)
      

      and make 2 separate join cursors for every AND condition. Then using merge sort we get required order for results of next() call for join cursors. It will be nice if we will be able to create one AND join index with ordering index == tbl_index_x and with nested OR index. Limitation for OR join is ok for us, it can be restricted by "compare" == "eq" and by all reference cursors in a OR join should be on the same table.

      Attachments

        Issue Links

          Activity

            People

              donald.anderson@mongodb.com Donald Anderson
              Denis Shkirya Denis Shkirya
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: