On Sunday, September 16, 2018 at 12:42:42 PM UTC-7, Janko Marohnić wrote:
>
> Wow, the COUNT approach is *really* inefficient compared to the IN 
> subquery, it totally makes sense never to use it :P
>
> Would you perhaps be open to adding a `Sequel::Model.association_dataset` 
> method some time in the future that would retrieve the 
> `eager_loading_dataset` (called with `.association_dataset(:association)`)? 
> I think it would be nice alternative, as it would allow one to avoid 
> duplicating any conditions and ordering configured for the association.
>

I'm not sure.  I would have to think about it.

There is the dataset_associations plugin, which is designed to provide 
association methods on class's dataset that return a dataset of associated 
objects.  That's probably going to more usable for most people, though it 
could be less efficient.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to