Hi Snyder,
I am not as skilled so I can't help you, but I'we too problems of
filter not applying to joins.
This is a big problem for me.
Also there is some other thing about filter... Can I explicitly
specify Not to use filter in a specific query? Use filter in every but
the ones I choose not to.
Looking forward some solution to this.
:-)
Luka



On Wed, Oct 24, 2012 at 4:03 PM, snyder-rls <[email protected]> wrote:
> We are trying to use Filters for our multi-tenant database, and have
> problems for two reasons.
> 1 - Filters are not universally applied to all styles of generated queries -
> correct query results, but big performance problem.
> 2 - Filter criteria are not applied at the join, but in the where clause
> (known issue - https://nhibernate.jira.com/browse/NH-1930) - potential
> incorrect query results, and big performance problem.
>
> I am studying the code to see if I can come up with solutions that we can
> contribute.
>
> I am finding it challenging to get my head around the implementation to see
> where the rubber hits the road with these issues, as they are fairly
> fundamental.  Any help focusing me on areas of the code would be
> appreciated.
>
> Specific Question re item 1 above - the fact that filters are not
> universally applied seems intentional, yet is a problem for multi-tenant
> filters and analogous data situations.  Are there reasons it would be bad
> for them to be used in ALL affected queries when they are applied from the
> application?  Would there therefore be a need to have a (session?) setting
> to keep the current behavior vs. making an applied filter "universal"?
>
> Clarification of performance issue:  An Id / primary key is horribly
> inefficient in a database with hundreds to thousands of  tenants as compared
> to using a multi-column tenant index (e.g. tenantid, id) - our worst case
> example so far with 100 tenants is 2 milliseconds vs 2 hours.
>

Reply via email to