On Dec 9, 1:03 pm, Jason Meckley <[email protected]> wrote: > ""Also does NH support MARS (multiple active record set) in SQL server > where I potentially can stream ALL the data" > I thought this is what NH is using under the hood to support > MultiQuery/Criteria and Future/FutureValue > > I didn't know that - I'd always assumed it was more like a batch SQL > with multiple record sets: > > select x from a; > select y from b;" > > Yeah, I thought they are one in the same.
I think the difference is in MARS (when enabled) on same connection you can do 2 concurrent commands: command 1 - select x from a command 2 - select y from b Then iterate over the records from each in parallel. http://www.sqlteam.com/article/multiple-active-result-sets-mars This is slightly different from 1 command submitting 2 SQL in a batch. > On Dec 9, 9:46 am, ajaishankar <[email protected]> wrote: > > > On Dec 9, 8:25 am, Jason Meckley <[email protected]> wrote: > > > > You may be able to do some form of ETL with NH and IStatelessSession. > > > But again, is NH the right tool? > > > I already got everything going in a nice set based SQL batch (ETL) but > > as new data points come in I'm having to replicate the logic at both > > places :-( > > > Once in detached criteria & once in SQL which I wanted to avoid with > > this exercise. > > > Am not convinces yet if it can all be done in NH since the metrics are > > all aggregations. > > > > "Also does NH support MARS (multiple active record set) in SQL server > > > where I potentially can stream ALL the data" > > > I thought this is what NH is using under the hood to support > > > MultiQuery/Criteria and Future/FutureValue > > > I didn't know that - I'd always assumed it was more like a batch SQL > > with multiple record sets: > > > select x from a; > > select y from b; > > > Which would then be lazily listed - though to the client it looks like > > an enumeration... > > > > another approach is to process customer individually or in small > > > batches each with a unique session. > > > Thanks Jason - I'll try this too but am liking a set based approach > > most... > > > > On Dec 9, 9:01 am, ajaishankar <[email protected]> wrote: > > > > > I am in a situation where I need to retrieve a list of customers (> > > > > 200K) and various metrics (over 15) for each customer. > > > > > Each one of the metrics collection code (such as #site_logins, > > > > #csrcalls etc) are already neatly written in criteria queries - but on > > > > a individual customer basis. > > > > > I was able to project each of these existing criteria into a group by > > > > Customer.Id. > > > > > So now I have potentially a stream of data each detached criteria > > > > generates: > > > > > Customers, CustomerLogin { CustomerId, NumLogin } , CSRCall > > > > { CustomerId, NumCalls } and so on... > > > > > I want to enumerate each result for some calculation and do not want > > > > to load everything to memory since it is a large data set > > > > > And doing the final (left) join in detached criteria I think is quite > > > > complex... > > > > > I am at a point where I'm pondering the following: > > > > > 1. Is it possible to stick everything in a multi-criteria and do the > > > > final join there itself and get just the last record set? > > > > > 2. A criteria transformer into a query would be helpful so that I can > > > > iterate enumerate the result > > > > > 3. Also does NH support MARS (multiple active record set) in SQL > > > > server where I potentially can stream ALL the data... > > > > > Ajai > > > > > On Dec 9, 5:33 am, Diego Mijelshon <[email protected]> wrote: > > > > > > No, it's not possible. What do you need it for? > > > > > > Diego > > > > > > On Wed, Dec 9, 2009 at 00:26, ajaishankar <[email protected]> > > > > > wrote: > > > > > > Hi > > > > > > > Is it possible to do an Enumerate on a criteria than a List? > > > > > > > I see IQuery having an Enumerate method... > > > > > > > I'm trying to loop through the results similar to a data reader... > > > > > > > Thanks > > > > > > > Ajai > > > > > > > -- > > > > > > > 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]<nhusers%[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.
