> >         care to share the name of this community member? :)
> 
> Send me an e-mail and I'll share it offline (I don't want to burn anyone
> unnecessarily).

        Will do :)

> >         care to share one as an example? I.o.w. I think it's more of
> > an edge case when you run into these limitations, with any o/r mapper
> > btw. Often these queries are using temp tables, cursors etc.
> 
> They are edge cases. And as I said, we can drop down to stored procedures
> when necessary to resolve these edge cases.
> 
> >         what does 'not stable' mean, exactly? Correlated subqueries
> > are either correct, or not, but 'unstable' is IMHO a term not used in
> > combination of correlated subqueries.
> 
> "not stable" is a term the consultant used, which I believe means that the
> sql statement performance will not scale linearly as the load increases
> and/or table size increases

        I can only think of correlated subqueries which fall into this
context if they return a scalar (e.g. a count), which can be done better
with a join of a derived table in some cases. Other than that, I don't see
what the alternative of these queries might be so that the performance is
linear scalable. (joins also aren't linear scalable for example if you have
1:n relationships to join)

> >         An example would be great.
> 
> The example used:
> 
> SELECT ...
> FROM ...
> WHERE [Id] IN (
>   SELECT TOP 200
>   [Id]
>   FROM ...
>   WHERE ...
>   ORDER BY ...
>   )
> WHERE ...
> 
> versus
> 
> SELECT ...
> FROM (
>   SELECT ...,
>     ROW_COUNT() OVER(ORDER BY...) AS [row_num]
>   FROM ...
>   WHERE ...
> )
> WHERE ...
> AND [row_num] < 200
> 
> The former is what we can generate with NHibernate using Criteria. The
> second we cannot.

        looks like a paging query for sqlserver 2005/8 ? 

                FB

> 
> Thanks,
> 
> --
> Joseph Daigle
> 
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to