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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.14.0, 5.0.0
    • None

    Description

      Had a good offline conversation with ndimiduk 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 R. Taylor
        2. PHOENIX-3941_v2.patch
          66 kB
          James R. Taylor
        3. PHOENIX-3941_v3.patch
          73 kB
          James R. Taylor
        4. PHOENIX-3941_v4.patch
          73 kB
          James R. Taylor

        Issue Links

          Activity

            People

              jamestaylor James R. Taylor
              jamestaylor James R. Taylor
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: