- 
        1. Re: fine grained row filters ( multi tenant access rules )rareddy Jan 27, 2015 12:10 PM (in response to maanenh58)Hanno, Which table is being retrieved fully? the Membership table? One suggestion is try injecting hint for dependent join like organisation_id in /*+ DJ */ (select organisation_id from membership where user_name = user()) See more info here Subquery Optimization - Teiid 8.10 (draft) - Project Documentation Editor HTH. Ramesh.. 
- 
        2. Re: fine grained row filters ( multi tenant access rules )maanenh58 Jan 27, 2015 5:44 PM (in response to rareddy)Hi Ramesh, The data table which has to be filtered is fetched completly, Potential millions of rows. SELECT g_0."organisation_id", g_0."text" FROM "public"."datatable" AS g_0 After that the membership table is fetched, only the rows of the current user SELECT g_0."organisation_id" FROM "public"."membership" AS g_0 WHERE g_0."user_name" = ? I tried to add the hint: /*+ DJ */, but there was no difference in the queries send to the database. Hanno 
- 
        3. Re: fine grained row filters ( multi tenant access rules )rareddy Jan 27, 2015 8:10 PM (in response to maanenh58)Please attach the query plan for the above execution. Query Plans - Teiid 8.10 (draft) - Project Documentation Editor 
- 
        4. Re: fine grained row filters ( multi tenant access rules )maanenh58 Jan 28, 2015 4:29 PM (in response to rareddy)Below the query plan (the table "membership" is in this example named: "organization_member") ProjectNode + Output Columns: 0: tenant (string) 1: key (string) 2: text (string) 3: organisation_id (long) + Statistics: 0: Node Output Rows: 4 1: Node Next Batch Process Time: 0 2: Node Cumulative Next Batch Process Time: 4 3: Node Cumulative Process Time: 19 4: Node Next Batch Calls: 3 5: Node Blocks: 2 + Cost Estimates:Estimated Node Cardinality: 1.3333334 + Child 0: LimitNode + Output Columns: 0: tenant (string) 1: key (string) 2: text (string) 3: organisation_id (long) + Statistics: 0: Node Output Rows: 4 1: Node Next Batch Process Time: 0 2: Node Cumulative Next Batch Process Time: 4 3: Node Cumulative Process Time: 19 4: Node Next Batch Calls: 3 5: Node Blocks: 2 + Cost Estimates:Estimated Node Cardinality: 1.3333334 + Child 0: SelectNode + Output Columns: 0: tenant (string) 1: key (string) 2: text (string) 3: organisation_id (long) + Statistics: 0: Node Output Rows: 4 1: Node Next Batch Process Time: 2 2: Node Cumulative Next Batch Process Time: 4 3: Node Cumulative Process Time: 19 4: Node Next Batch Calls: 3 5: Node Blocks: 2 + Cost Estimates:Estimated Node Cardinality: 1.3333334 + Child 0: AccessNode + Output Columns: 0: organisation_id (long) 1: tenant (string) 2: key (string) 3: text (string) + Statistics: 0: Node Output Rows: 4 1: Node Next Batch Process Time: 2 2: Node Cumulative Next Batch Process Time: 2 3: Node Cumulative Process Time: 11 4: Node Next Batch Calls: 2 5: Node Blocks: 1 + Cost Estimates:Estimated Node Cardinality: 4.0 + Query:SELECT g_0.organisation_id, g_0.tenant, g_0.key, g_0.text FROM TestHanno.testhanno AS g_0 + Model Name:TestHanno + Criteria Subplan 0: AccessNode + Output Columns:organisation_id (long) + Cost Estimates:Estimated Node Cardinality: 3.0 + Query:SELECT g_0.organisation_id FROM authorisation.organization_member AS g_0 WHERE g_0.user_name = 'user@teiid-security' + Model Name:authorisation + Criteria:TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member) + Row Offset:null + Row Limit:100 + Select Columns: 0: TestHanno.testhanno.tenant 1: TestHanno.testhanno.key 2: TestHanno.testhanno.text 3: TestHanno.testhanno.organisation_id + Data Bytes Sent:137 
- 
        5. Re: fine grained row filters ( multi tenant access rules )maanenh58 Jan 28, 2015 4:30 PM (in response to maanenh58)And the debug log: 21:16:42,303 INFO [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue12) eQa2b4JtouAh PostgreSQLExecutionFactory Commit=true;DatabaseProductName=PostgreSQL;DatabaseProductVersion=9.3.5;DriverMajorVersion=9;DriverMajorVersion=3;DriverName=PostgreSQL Native Driver;DriverVersion=PostgreSQL 9.3 JDBC4.1 (build 1101);IsolationLevel=2 21:16:42,306 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue12) eQa2b4JtouAh Initializing the capabilities for postgresql 21:16:42,306 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue12) eQa2b4JtouAh Setting the database version to 9.3.5 21:16:42,521 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue12) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Create State 21:16:42,544 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue13) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Processing NEW request: SELECT g_0.organisation_id, g_0.tenant, g_0.key, g_0.text FROM TestHanno.testhanno AS g_0 21:16:42,547 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue13) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Obtained execution 21:16:42,551 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue13) eQa2b4JtouAh Source-specific command: SELECT g_0."organisation_id", g_0."tenant", g_0."key", g_0."text" FROM "public"."testhanno" AS g_0 21:16:42,560 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue13) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Executed command 21:16:42,560 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue13) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Processing MORE request 21:16:42,560 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue13) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Getting results from connector 21:16:42,560 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue13) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Obtained last batch, total row count: 4 21:16:42,561 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue14) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Remove State 21:16:42,562 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue14) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Processing Close : SELECT g_0.organisation_id, g_0.tenant, g_0.key, g_0.text FROM TestHanno.testhanno AS g_0 21:16:42,567 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue14) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Closed execution 21:16:42,567 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue14) eQa2b4JtouAh eQa2b4JtouAh.6.4.0 Closed connection 21:16:42,568 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue14) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Create State 21:16:42,570 DEBUG [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue15) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Processing NEW request: SELECT g_0.organisation_id FROM authorisation.organization_member AS g_0 WHERE g_0.user_name = 'user@teiid-security' 21:16:42,579 DEBUG [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue15) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Obtained execution 21:16:42,580 DEBUG [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue15) eQa2b4JtouAh Source-specific command: SELECT g_0."organisation_id" FROM "public"."organization_member" AS g_0 WHERE g_0."user_name" = ? 21:16:42,583 DEBUG [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue15) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Executed command 21:16:42,583 DEBUG [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue15) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Processing MORE request 21:16:42,583 DEBUG [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue15) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Getting results from connector 21:16:42,583 DEBUG [org.teiid.CONNECTOR] (Worker2_QueryProcessorQueue15) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Obtained last batch, total row count: 3 21:16:42,584 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue16) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Remove State 21:16:42,584 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue16) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Processing Close : SELECT g_0.organisation_id FROM authorisation.organization_member AS g_0 WHERE g_0.user_name = 'user@teiid-security' 21:16:42,584 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue16) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Closed execution 21:16:42,584 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue16) eQa2b4JtouAh eQa2b4JtouAh.6.0.1 Closed connection 
- 
        6. Re: fine grained row filters ( multi tenant access rules )shawkins Jan 28, 2015 4:36 PM (in response to maanenh58)The debug log looks to only contain connector related logs. We would need either the plan debug log - "set showplan debug" or a more complete debug log - such as setting all of org.teiid to log at a debug level. 
- 
        7. Re: fine grained row filters ( multi tenant access rules )maanenh58 Jan 28, 2015 4:45 PM (in response to shawkins)Below the "showplan debug" output: ============================================================================ USER COMMAND: SELECT TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id FROM TestHanno_DDC.testhanno LIMIT 100 ---------------------------------------------------------------------------- OPTIMIZE: SELECT TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id FROM TestHanno_DDC.testhanno LIMIT 100 ---------------------------------------------------------------------------- GENERATE CANONICAL: SELECT TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id FROM TestHanno_DDC.testhanno LIMIT 100 CANONICAL PLAN: TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100}) Project(groups=[TestHanno_DDC.testhanno], props={PROJECT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id]}) Source(groups=[TestHanno_DDC.testhanno], props={NESTED_COMMAND=SELECT TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text, TestHanno_VBL.testhanno.organisation_id FROM TestHanno_VBL.testhanno, SYMBOL_MAP={TestHanno_DDC.testhanno.tenant=TestHanno_VBL.testhanno.tenant, TestHanno_DDC.testhanno.key=TestHanno_VBL.testhanno.key, TestHanno_DDC.testhanno.text=TestHanno_VBL.testhanno.text, TestHanno_DDC.testhanno.organisation_id=TestHanno_VBL.testhanno.organisation_id}}) Project(groups=[TestHanno_VBL.testhanno], props={PROJECT_COLS=[TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text, TestHanno_VBL.testhanno.organisation_id]}) Source(groups=[TestHanno_VBL.testhanno], props={NESTED_COMMAND=SELECT TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id FROM TestHanno.testhanno, SYMBOL_MAP={TestHanno_VBL.testhanno.tenant=TestHanno.testhanno.tenant, TestHanno_VBL.testhanno.key=TestHanno.testhanno.key, TestHanno_VBL.testhanno.text=TestHanno.testhanno.text, TestHanno_VBL.testhanno.organisation_id=TestHanno.testhanno.organisation_id}}) Project(groups=[TestHanno.testhanno], props={PROJECT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id]}) Source(groups=[TestHanno.testhanno]) ============================================================================ EXECUTING PlaceAccess AFTER: TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100}) Project(groups=[TestHanno_DDC.testhanno], props={PROJECT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id]}) Source(groups=[TestHanno_DDC.testhanno], props={NESTED_COMMAND=SELECT TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text, TestHanno_VBL.testhanno.organisation_id FROM TestHanno_VBL.testhanno, SYMBOL_MAP={TestHanno_DDC.testhanno.tenant=TestHanno_VBL.testhanno.tenant, TestHanno_DDC.testhanno.key=TestHanno_VBL.testhanno.key, TestHanno_DDC.testhanno.text=TestHanno_VBL.testhanno.text, TestHanno_DDC.testhanno.organisation_id=TestHanno_VBL.testhanno.organisation_id}}) Project(groups=[TestHanno_VBL.testhanno], props={PROJECT_COLS=[TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text, TestHanno_VBL.testhanno.organisation_id]}) Source(groups=[TestHanno_VBL.testhanno], props={NESTED_COMMAND=SELECT TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id FROM TestHanno.testhanno, SYMBOL_MAP={TestHanno_VBL.testhanno.tenant=TestHanno.testhanno.tenant, TestHanno_VBL.testhanno.key=TestHanno.testhanno.key, TestHanno_VBL.testhanno.text=TestHanno.testhanno.text, TestHanno_VBL.testhanno.organisation_id=TestHanno.testhanno.organisation_id}}) Project(groups=[TestHanno.testhanno], props={PROJECT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id]}) Access(groups=[TestHanno.testhanno], props={SOURCE_HINT=null, MODEL_ID=Schema name=TestHanno, nameInSource=null, uuid=mmuuid:22e35fbb-7a27-4004-8faf-75ee883f36cb}) Source(groups=[TestHanno.testhanno]) ============================================================================ EXECUTING ApplySecurity ---------------------------------------------------------------------------- OPTIMIZE: SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member ---------------------------------------------------------------------------- GENERATE CANONICAL: SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member CANONICAL PLAN: Project(groups=[Authorisation_DDC.organization_member], props={PROJECT_COLS=[Authorisation_DDC.organization_member.organisation_id]}) Source(groups=[Authorisation_DDC.organization_member], props={NESTED_COMMAND=SELECT Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id FROM Authorisation_VBL.organization_member, SYMBOL_MAP={Authorisation_DDC.organization_member.user_name=Authorisation_VBL.organization_member.user_name, Authorisation_DDC.organization_member.organisation_id=Authorisation_VBL.organization_member.organisation_id}}) Project(groups=[Authorisation_VBL.organization_member], props={PROJECT_COLS=[Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id]}) Source(groups=[Authorisation_VBL.organization_member], props={NESTED_COMMAND=SELECT authorisation.organization_member.user_name, authorisation.organization_member.organisation_id FROM authorisation.organization_member, SYMBOL_MAP={Authorisation_VBL.organization_member.user_name=authorisation.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id=authorisation.organization_member.organisation_id}}) Project(groups=[authorisation.organization_member], props={PROJECT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id]}) Source(groups=[authorisation.organization_member]) ============================================================================ EXECUTING PlaceAccess AFTER: Project(groups=[Authorisation_DDC.organization_member], props={PROJECT_COLS=[Authorisation_DDC.organization_member.organisation_id]}) Source(groups=[Authorisation_DDC.organization_member], props={NESTED_COMMAND=SELECT Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id FROM Authorisation_VBL.organization_member, SYMBOL_MAP={Authorisation_DDC.organization_member.user_name=Authorisation_VBL.organization_member.user_name, Authorisation_DDC.organization_member.organisation_id=Authorisation_VBL.organization_member.organisation_id}}) Project(groups=[Authorisation_VBL.organization_member], props={PROJECT_COLS=[Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id]}) Source(groups=[Authorisation_VBL.organization_member], props={NESTED_COMMAND=SELECT authorisation.organization_member.user_name, authorisation.organization_member.organisation_id FROM authorisation.organization_member, SYMBOL_MAP={Authorisation_VBL.organization_member.user_name=authorisation.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id=authorisation.organization_member.organisation_id}}) Project(groups=[authorisation.organization_member], props={PROJECT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id]}) Access(groups=[authorisation.organization_member], props={SOURCE_HINT=null, MODEL_ID=Schema name=authorisation, nameInSource=null, uuid=mmuuid:0e62fba1-73c9-4934-b9d2-d1393f052e8c}) Source(groups=[authorisation.organization_member]) ============================================================================ EXECUTING ApplySecurity AFTER: Project(groups=[Authorisation_DDC.organization_member], props={PROJECT_COLS=[Authorisation_DDC.organization_member.organisation_id]}) Select(groups=[Authorisation_DDC.organization_member], props={SELECT_CRITERIA=Authorisation_DDC.organization_member.user_name = 'user@teiid-security'}) Source(groups=[Authorisation_DDC.organization_member], props={NESTED_COMMAND=SELECT Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id FROM Authorisation_VBL.organization_member, SYMBOL_MAP={Authorisation_DDC.organization_member.user_name=Authorisation_VBL.organization_member.user_name, Authorisation_DDC.organization_member.organisation_id=Authorisation_VBL.organization_member.organisation_id}}) Project(groups=[Authorisation_VBL.organization_member]) Source(groups=[Authorisation_VBL.organization_member]) Project(groups=[authorisation.organization_member]) Access(groups=[authorisation.organization_member]) Source(groups=[authorisation.organization_member]) ============================================================================ EXECUTING AssignOutputElements AFTER: Project(groups=[Authorisation_DDC.organization_member], props={PROJECT_COLS=[Authorisation_DDC.organization_member.organisation_id], OUTPUT_COLS=[Authorisation_DDC.organization_member.organisation_id]}) Select(groups=[Authorisation_DDC.organization_member], props={SELECT_CRITERIA=Authorisation_DDC.organization_member.user_name = 'user@teiid-security', OUTPUT_COLS=[Authorisation_DDC.organization_member.organisation_id]}) Source(groups=[Authorisation_DDC.organization_member], props={NESTED_COMMAND=SELECT Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id FROM Authorisation_VBL.organization_member, SYMBOL_MAP={Authorisation_DDC.organization_member.user_name=Authorisation_VBL.organization_member.user_name, Authorisation_DDC.organization_member.organisation_id=Authorisation_VBL.organization_member.organisation_id}, OUTPUT_COLS=[Authorisation_DDC.organization_member.user_name, Authorisation_DDC.organization_member.organisation_id]}) Project(groups=[Authorisation_VBL.organization_member], props={PROJECT_COLS=[Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id], OUTPUT_COLS=[Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id]}) Source(groups=[Authorisation_VBL.organization_member], props={NESTED_COMMAND=SELECT authorisation.organization_member.user_name, authorisation.organization_member.organisation_id FROM authorisation.organization_member, SYMBOL_MAP={Authorisation_VBL.organization_member.user_name=authorisation.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id=authorisation.organization_member.organisation_id}, OUTPUT_COLS=[Authorisation_VBL.organization_member.user_name, Authorisation_VBL.organization_member.organisation_id]}) Project(groups=[authorisation.organization_member], props={PROJECT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id], OUTPUT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id]}) Access(groups=[authorisation.organization_member], props={SOURCE_HINT=null, MODEL_ID=Schema name=authorisation, nameInSource=null, uuid=mmuuid:0e62fba1-73c9-4934-b9d2-d1393f052e8c, OUTPUT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id]}) Source(groups=[authorisation.organization_member], props={OUTPUT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id]}) ============================================================================ EXECUTING MergeVirtual AFTER: Project(groups=[authorisation.organization_member], props={PROJECT_COLS=[authorisation.organization_member.organisation_id], OUTPUT_COLS=[Authorisation_DDC.organization_member.organisation_id]}) Select(groups=[authorisation.organization_member], props={SELECT_CRITERIA=authorisation.organization_member.user_name = 'user@teiid-security', OUTPUT_COLS=[Authorisation_DDC.organization_member.organisation_id]}) Access(groups=[authorisation.organization_member], props={SOURCE_HINT=null, MODEL_ID=Schema name=authorisation, nameInSource=null, uuid=mmuuid:0e62fba1-73c9-4934-b9d2-d1393f052e8c, OUTPUT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id]}) Source(groups=[authorisation.organization_member]) ============================================================================ EXECUTING CleanCriteria AFTER: Project(groups=[authorisation.organization_member], props={PROJECT_COLS=[authorisation.organization_member.organisation_id], OUTPUT_COLS=null}) Select(groups=[authorisation.organization_member], props={SELECT_CRITERIA=authorisation.organization_member.user_name = 'user@teiid-security', OUTPUT_COLS=null}) Access(groups=[authorisation.organization_member], props={SOURCE_HINT=null, MODEL_ID=Schema name=authorisation, nameInSource=null, uuid=mmuuid:0e62fba1-73c9-4934-b9d2-d1393f052e8c, OUTPUT_COLS=null}) Source(groups=[authorisation.organization_member], props={OUTPUT_COLS=null}) ============================================================================ EXECUTING RaiseAccess AFTER: Access(groups=[authorisation.organization_member], props={SOURCE_HINT=null, MODEL_ID=Schema name=authorisation, nameInSource=null, uuid=mmuuid:0e62fba1-73c9-4934-b9d2-d1393f052e8c, OUTPUT_COLS=null}) Project(groups=[authorisation.organization_member], props={PROJECT_COLS=[authorisation.organization_member.organisation_id], OUTPUT_COLS=null}) Select(groups=[authorisation.organization_member], props={SELECT_CRITERIA=authorisation.organization_member.user_name = 'user@teiid-security', OUTPUT_COLS=null}) Source(groups=[authorisation.organization_member], props={OUTPUT_COLS=null}) ============================================================================ EXECUTING AssignOutputElements AFTER: Access(groups=[authorisation.organization_member], props={SOURCE_HINT=null, MODEL_ID=Schema name=authorisation, nameInSource=null, uuid=mmuuid:0e62fba1-73c9-4934-b9d2-d1393f052e8c, OUTPUT_COLS=[authorisation.organization_member.organisation_id]}) Project(groups=[authorisation.organization_member], props={PROJECT_COLS=[authorisation.organization_member.organisation_id], OUTPUT_COLS=[authorisation.organization_member.organisation_id]}) Select(groups=[authorisation.organization_member], props={SELECT_CRITERIA=authorisation.organization_member.user_name = 'user@teiid-security', OUTPUT_COLS=[authorisation.organization_member.organisation_id]}) Source(groups=[authorisation.organization_member], props={OUTPUT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id]}) ============================================================================ EXECUTING CalculateCost AFTER: Access(groups=[authorisation.organization_member], props={SOURCE_HINT=null, MODEL_ID=Schema name=authorisation, nameInSource=null, uuid=mmuuid:0e62fba1-73c9-4934-b9d2-d1393f052e8c, OUTPUT_COLS=[authorisation.organization_member.organisation_id], EST_CARDINALITY=3.0, EST_COL_STATS={authorisation.organization_member.organisation_id=[-1.0, -1.0]}}) Project(groups=[authorisation.organization_member], props={PROJECT_COLS=[authorisation.organization_member.organisation_id], OUTPUT_COLS=[authorisation.organization_member.organisation_id], EST_CARDINALITY=3.0, EST_COL_STATS={authorisation.organization_member.organisation_id=[-1.0, -1.0]}}) Select(groups=[authorisation.organization_member], props={SELECT_CRITERIA=authorisation.organization_member.user_name = 'user@teiid-security', OUTPUT_COLS=[authorisation.organization_member.organisation_id], EST_CARDINALITY=3.0, EST_COL_STATS={authorisation.organization_member.organisation_id=[-1.0, -1.0]}}) Source(groups=[authorisation.organization_member], props={OUTPUT_COLS=[authorisation.organization_member.user_name, authorisation.organization_member.organisation_id], EST_COL_STATS={authorisation.organization_member.user_name=[-1.0, -1.0], authorisation.organization_member.organisation_id=[-1.0, -1.0]}, EST_CARDINALITY=3.0}) ============================================================================ EXECUTING PlanSorts AFTER: Access(groups=[authorisation.organization_member]) Project(groups=[authorisation.organization_member]) Select(groups=[authorisation.organization_member]) Source(groups=[authorisation.organization_member]) ============================================================================ EXECUTING CollapseSource AFTER: Access(groups=[authorisation.organization_member], props={SOURCE_HINT=null, MODEL_ID=Schema name=authorisation, nameInSource=null, uuid=mmuuid:0e62fba1-73c9-4934-b9d2-d1393f052e8c, OUTPUT_COLS=[authorisation.organization_member.organisation_id], EST_CARDINALITY=3.0, EST_COL_STATS={authorisation.organization_member.organisation_id=[-1.0, -1.0]}, ATOMIC_REQUEST=SELECT authorisation.organization_member.organisation_id FROM authorisation.organization_member WHERE authorisation.organization_member.user_name = 'user@teiid-security'}) ============================================================================ CONVERTING PLAN TREE TO PROCESS TREE PROCESS PLAN = AccessNode(0) output=[authorisation.organization_member.organisation_id] SELECT g_0.organisation_id FROM authorisation.organization_member AS g_0 WHERE g_0.user_name = 'user@teiid-security' ============================================================================ ---------------------------------------------------------------------------- OPTIMIZATION COMPLETE: PROCESSOR PLAN: AccessNode(0) output=[authorisation.organization_member.organisation_id] SELECT g_0.organisation_id FROM authorisation.organization_member AS g_0 WHERE g_0.user_name = 'user@teiid-security' ============================================================================ AFTER: TupleLimit(groups=[]) Project(groups=[TestHanno_DDC.testhanno], props={PROJECT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id]}) Select(groups=[TestHanno_DDC.testhanno], props={SELECT_CRITERIA=TestHanno_DDC.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member)}) Source(groups=[TestHanno_DDC.testhanno], props={NESTED_COMMAND=SELECT TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text, TestHanno_VBL.testhanno.organisation_id FROM TestHanno_VBL.testhanno, SYMBOL_MAP={TestHanno_DDC.testhanno.tenant=TestHanno_VBL.testhanno.tenant, TestHanno_DDC.testhanno.key=TestHanno_VBL.testhanno.key, TestHanno_DDC.testhanno.text=TestHanno_VBL.testhanno.text, TestHanno_DDC.testhanno.organisation_id=TestHanno_VBL.testhanno.organisation_id}}) Project(groups=[TestHanno_VBL.testhanno]) Source(groups=[TestHanno_VBL.testhanno]) Project(groups=[TestHanno.testhanno]) Access(groups=[TestHanno.testhanno]) Source(groups=[TestHanno.testhanno]) ============================================================================ EXECUTING AssignOutputElements AFTER: TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id]}) Project(groups=[TestHanno_DDC.testhanno], props={PROJECT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id], OUTPUT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id]}) Select(groups=[TestHanno_DDC.testhanno], props={SELECT_CRITERIA=TestHanno_DDC.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member), OUTPUT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id]}) Source(groups=[TestHanno_DDC.testhanno], props={NESTED_COMMAND=SELECT TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text, TestHanno_VBL.testhanno.organisation_id FROM TestHanno_VBL.testhanno, SYMBOL_MAP={TestHanno_DDC.testhanno.organisation_id=TestHanno_VBL.testhanno.organisation_id, TestHanno_DDC.testhanno.tenant=TestHanno_VBL.testhanno.tenant, TestHanno_DDC.testhanno.key=TestHanno_VBL.testhanno.key, TestHanno_DDC.testhanno.text=TestHanno_VBL.testhanno.text}, OUTPUT_COLS=[TestHanno_DDC.testhanno.organisation_id, TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text]}) Project(groups=[TestHanno_VBL.testhanno], props={PROJECT_COLS=[TestHanno_VBL.testhanno.organisation_id, TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text], OUTPUT_COLS=[TestHanno_VBL.testhanno.organisation_id, TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text]}) Source(groups=[TestHanno_VBL.testhanno], props={NESTED_COMMAND=SELECT TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id FROM TestHanno.testhanno, SYMBOL_MAP={TestHanno_VBL.testhanno.organisation_id=TestHanno.testhanno.organisation_id, TestHanno_VBL.testhanno.tenant=TestHanno.testhanno.tenant, TestHanno_VBL.testhanno.key=TestHanno.testhanno.key, TestHanno_VBL.testhanno.text=TestHanno.testhanno.text}, OUTPUT_COLS=[TestHanno_VBL.testhanno.organisation_id, TestHanno_VBL.testhanno.tenant, TestHanno_VBL.testhanno.key, TestHanno_VBL.testhanno.text]}) Project(groups=[TestHanno.testhanno], props={PROJECT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text], OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text]}) Access(groups=[TestHanno.testhanno], props={SOURCE_HINT=null, MODEL_ID=Schema name=TestHanno, nameInSource=null, uuid=mmuuid:22e35fbb-7a27-4004-8faf-75ee883f36cb, OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text]}) Source(groups=[TestHanno.testhanno], props={OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text]}) ============================================================================ EXECUTING MergeVirtual AFTER: TupleLimit(groups=[]) Project(groups=[TestHanno.testhanno], props={PROJECT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], OUTPUT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id]}) Select(groups=[TestHanno.testhanno], props={SELECT_CRITERIA=TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member), OUTPUT_COLS=[TestHanno_DDC.testhanno.tenant, TestHanno_DDC.testhanno.key, TestHanno_DDC.testhanno.text, TestHanno_DDC.testhanno.organisation_id]}) Access(groups=[TestHanno.testhanno], props={SOURCE_HINT=null, MODEL_ID=Schema name=TestHanno, nameInSource=null, uuid=mmuuid:22e35fbb-7a27-4004-8faf-75ee883f36cb, OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text]}) Source(groups=[TestHanno.testhanno]) ============================================================================ EXECUTING CleanCriteria AFTER: TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=null}) Project(groups=[TestHanno.testhanno], props={PROJECT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], OUTPUT_COLS=null}) Select(groups=[TestHanno.testhanno], props={SELECT_CRITERIA=TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member), OUTPUT_COLS=null}) Access(groups=[TestHanno.testhanno], props={SOURCE_HINT=null, MODEL_ID=Schema name=TestHanno, nameInSource=null, uuid=mmuuid:22e35fbb-7a27-4004-8faf-75ee883f36cb, OUTPUT_COLS=null}) Source(groups=[TestHanno.testhanno], props={OUTPUT_COLS=null}) ============================================================================ EXECUTING RaiseAccess LOW Relational Planner Subquery cannot be pushed down TestHanno - SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member was not pushed AFTER: TupleLimit(groups=[]) Project(groups=[TestHanno.testhanno]) Select(groups=[TestHanno.testhanno], props={SELECT_CRITERIA=TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member), OUTPUT_COLS=null}) Access(groups=[TestHanno.testhanno], props={SOURCE_HINT=null, MODEL_ID=Schema name=TestHanno, nameInSource=null, uuid=mmuuid:22e35fbb-7a27-4004-8faf-75ee883f36cb, OUTPUT_COLS=null}) Source(groups=[TestHanno.testhanno]) ============================================================================ EXECUTING PushLimit AFTER: Project(groups=[TestHanno.testhanno], props={PROJECT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], OUTPUT_COLS=null, SOURCE_HINT=null}) TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=null}) Select(groups=[TestHanno.testhanno], props={SELECT_CRITERIA=TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member), OUTPUT_COLS=null}) Access(groups=[TestHanno.testhanno]) Source(groups=[TestHanno.testhanno]) ============================================================================ EXECUTING AssignOutputElements AFTER: Project(groups=[TestHanno.testhanno], props={PROJECT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], OUTPUT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], SOURCE_HINT=null}) TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id]}) Select(groups=[TestHanno.testhanno], props={SELECT_CRITERIA=TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member), OUTPUT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id]}) Access(groups=[TestHanno.testhanno], props={SOURCE_HINT=null, MODEL_ID=Schema name=TestHanno, nameInSource=null, uuid=mmuuid:22e35fbb-7a27-4004-8faf-75ee883f36cb, OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text]}) Source(groups=[TestHanno.testhanno], props={OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text]}) ============================================================================ EXECUTING CalculateCost AFTER: Project(groups=[TestHanno.testhanno], props={PROJECT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], OUTPUT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], SOURCE_HINT=null, EST_CARDINALITY=1.3333334, EST_COL_STATS={TestHanno.testhanno.tenant=[-1.0, -1.0], TestHanno.testhanno.key=[-1.0, -1.0], TestHanno.testhanno.text=[-1.0, -1.0], TestHanno.testhanno.organisation_id=[-1.0, -1.0]}}) TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=100, OUTPUT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], EST_CARDINALITY=1.3333334, EST_COL_STATS={TestHanno.testhanno.tenant=[-1.0, -1.0], TestHanno.testhanno.key=[-1.0, -1.0], TestHanno.testhanno.text=[-1.0, -1.0], TestHanno.testhanno.organisation_id=[-1.0, -1.0]}}) Select(groups=[TestHanno.testhanno], props={SELECT_CRITERIA=TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member), OUTPUT_COLS=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id], EST_CARDINALITY=1.3333334, EST_COL_STATS={TestHanno.testhanno.tenant=[-1.0, -1.0], TestHanno.testhanno.key=[-1.0, -1.0], TestHanno.testhanno.text=[-1.0, -1.0], TestHanno.testhanno.organisation_id=[-1.0, -1.0]}}) Access(groups=[TestHanno.testhanno], props={SOURCE_HINT=null, MODEL_ID=Schema name=TestHanno, nameInSource=null, uuid=mmuuid:22e35fbb-7a27-4004-8faf-75ee883f36cb, OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text], EST_CARDINALITY=4.0, EST_COL_STATS={TestHanno.testhanno.organisation_id=[-1.0, -1.0], TestHanno.testhanno.tenant=[-1.0, -1.0], TestHanno.testhanno.key=[-1.0, -1.0], TestHanno.testhanno.text=[-1.0, -1.0]}}) Source(groups=[TestHanno.testhanno], props={OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text], EST_COL_STATS={TestHanno.testhanno.organisation_id=[-1.0, -1.0], TestHanno.testhanno.tenant=[-1.0, -1.0], TestHanno.testhanno.key=[-1.0, -1.0], TestHanno.testhanno.text=[-1.0, -1.0]}, EST_CARDINALITY=4.0}) ============================================================================ EXECUTING PlanSorts AFTER: Project(groups=[TestHanno.testhanno]) TupleLimit(groups=[]) Select(groups=[TestHanno.testhanno]) Access(groups=[TestHanno.testhanno]) Source(groups=[TestHanno.testhanno]) ============================================================================ EXECUTING CollapseSource AFTER: Project(groups=[TestHanno.testhanno]) TupleLimit(groups=[]) Select(groups=[TestHanno.testhanno]) Access(groups=[TestHanno.testhanno], props={SOURCE_HINT=null, MODEL_ID=Schema name=TestHanno, nameInSource=null, uuid=mmuuid:22e35fbb-7a27-4004-8faf-75ee883f36cb, OUTPUT_COLS=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text], EST_CARDINALITY=4.0, EST_COL_STATS={TestHanno.testhanno.organisation_id=[-1.0, -1.0], TestHanno.testhanno.tenant=[-1.0, -1.0], TestHanno.testhanno.key=[-1.0, -1.0], TestHanno.testhanno.text=[-1.0, -1.0]}, ATOMIC_REQUEST=SELECT TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text FROM TestHanno.testhanno}) ============================================================================ CONVERTING PLAN TREE TO PROCESS TREE PROCESS PLAN = ProjectNode(1) output=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id] [TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id] LimitNode(2) output=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id] limit 100 SelectNode(3) output=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id] TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member) AccessNode(4) output=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text] SELECT g_0.organisation_id, g_0.tenant, g_0.key, g_0.text FROM TestHanno.testhanno AS g_0 ============================================================================ ---------------------------------------------------------------------------- OPTIMIZATION COMPLETE: PROCESSOR PLAN: ProjectNode(1) output=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id] [TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id] LimitNode(2) output=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id] limit 100 SelectNode(3) output=[TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text, TestHanno.testhanno.organisation_id] TestHanno.testhanno.organisation_id IN /*+ DJ */ (SELECT Authorisation_DDC.organization_member.organisation_id FROM Authorisation_DDC.organization_member) AccessNode(4) output=[TestHanno.testhanno.organisation_id, TestHanno.testhanno.tenant, TestHanno.testhanno.key, TestHanno.testhanno.text] SELECT g_0.organisation_id, g_0.tenant, g_0.key, g_0.text FROM TestHanno.testhanno AS g_0 ============================================================================ 
- 
        8. Re: fine grained row filters ( multi tenant access rules )shawkins Jan 28, 2015 5:48 PM (in response to maanenh58)Thanks Hanno, That makes it clearer. The issue is that the hint is currently applicable during rewrite, but the inclusion of the row filter is happening later in planning. It would take an enhancement to use the subquery hint from a security condition. Steve 
 
     
    