[Dbix-class] Passing values to a custom join condition
Peter Rabbitson
rabbit+dbic at rabbit.us
Thu Jan 9 07:05:19 GMT 2014
On Tue, Jan 07, 2014 at 12:24:20AM +0000, Lianna Eeftinck wrote:
>
> ResultSet chaining is quite powerful, and used properly it can avoid
> much of the
> hacking you need to do with relationships to do things like this
This is true in most cases, but if you need to utilize prefetching you
have no choice but to do this in a custom relationship condition. Also
many "optional-left-join" cases optimize much much better in RDBMS qury
plans as opposed to the WHERE-based equivalents.
> (having a sane schema also helps a lot).
True, and in the vast majority of cases this is not an option. Database
work is most often centered around a preexisting schema used by multiple
disparate products.
Cheers
More information about the DBIx-Class
mailing list