On Thursday, February 20, 2020 at 1:36:17 PM UTC-8, BeeRich33 wrote: > > Actually, it turns out your .excude method is used as a subquery on a LEFT > JOIN and it's quite a good approach. > > I was curious as I'm whipping up subqueries all the time now, which I know > adds trips to the database. I would sacrifice some chatter for > understanding and dataset stability. Quite happy in fact. >
Subqueries don't add trips to the database, only separate queries do. The database will consider the entire query including all subqueries and execute a single plan to return the expected data. In general, unless you are running into a performance bottleneck, I would not worry about it. 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 view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/567e77bc-9d74-409c-a865-aa396d5edff8%40googlegroups.com.
