On 1/2/07, Matt S Trout <[EMAIL PROTECTED]> wrote:
On 31 Dec 2006, at 09:25, Matt LeBlanc wrote: > > This would be because MySQL tends to suck the more you join. In most > other databases, joins tend to be much quicker with slower subqueries. Actually, databases with a decent optimiser will tend to unroll subqueries and the execution plan will be equivalent to the join. Certainly Pg's will do this in many cases.
Yes, if the optimizer is smart enough. Of course, then I would have to input SQL to my SQL wrapper. ;)
More pertinently, I suspect the join cond you want isn't currently achievable with DBIx::Class whereas aristotle's approach is, so I'd suggest going with his approach and if it turns out to be a major performance issue perhaps we can discuss what changes need to be made and how the syntax would need to be extended in order to support yours?
Last I checked, it isn't. I have a hacked up version of DBIx::Class locally that allows such niceties as dynamic join conditions and quoted order by clauses with direction (don't know if this is currently available but it wasn't last I checked).
-- Matt S Trout, Technical Director, Shadowcat Systems Ltd. Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ +
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
