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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


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


      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.


        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



            • Assignee:
              jamestaylor James R. Taylor
              jamestaylor James R. Taylor


              • Created:

                Issue deployment