Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3941

Filter regions to scan for local indexes based on data table leading pk filter conditions

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.14.0, 5.0.0
    • Labels:

      Description

      Had a good offline conversation with Nick Dimiduk at PhoenixCon about local indexes. Depending on the query, we can often times prune the regions we need to scan over based on the where conditions against the data table pk. For example, with a multi-tenant table, we only need to scan the regions that are prefixed by the tenant ID.

      We can easily get this information from the compilation of the query against the data table (which we always do), through the statementContext.getScanRanges() structure. We'd just want to keep a pointer to the data table QueryPlan from the local index QueryPlan.

        Attachments

        1. PHOENIX-3941_v1.patch
          51 kB
          James Taylor
        2. PHOENIX-3941_v2.patch
          66 kB
          James Taylor
        3. PHOENIX-3941_v3.patch
          73 kB
          James Taylor
        4. PHOENIX-3941_v4.patch
          73 kB
          James Taylor

          Activity

            People

            • Assignee:
              jamestaylor James Taylor
              Reporter:
              jamestaylor James Taylor
            • Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: