You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Geoffrey Jacoby (JIRA)" <ji...@apache.org> on 2019/04/18 15:24:00 UTC

[jira] [Created] (PHOENIX-5248) Allow MULTI_TENANT to use any PK column

Geoffrey Jacoby created PHOENIX-5248:
----------------------------------------

             Summary: Allow MULTI_TENANT to use any PK column
                 Key: PHOENIX-5248
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5248
             Project: Phoenix
          Issue Type: Improvement
            Reporter: Geoffrey Jacoby
            Assignee: Geoffrey Jacoby


Phoenix's multi-tenancy support is incredibly useful, because it allows systems to give users connections that transparently filter a multi-tenant environment to return only their data. However, it's only supported for the leading column of the PK and has to be manually enabled per-table.

One common use case I've encountered is a multi-tenant table whose keyspace is fully covered by disjoint views, with the views all filtering on enumerations of the same PK column -- let's call it ViewId.  The most natural way to represent that is by a PK of <ViewId, TenantId, ...> which would allow fast lookups by tenant connections AND fast cross-tenant queries by admin processes. However, multi-tenancy requires the key be <TenantId, ViewId> which is only fast for the tenant connections, not global processes. It would be great if I could set a property on the table, MULTI_TENANT_COLUMN = "TenantId", and column was used for auto-filtering instead. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)