On Fri, May 10, 2013 at 04:46:45PM +0100, Bob MacCallum wrote:
> (I'm using 0.08250)
>
> I'll avoid a boring preamble and just ask if anyone could advise on
> how to construct resultsets so that deep in the internals,
> _prune_unused_joins isn't called? (so as to save me some CPU cycles)
>
> I have tried to read the code but I'm not really sure what $ident is holding.
>
> Here's the query that is called most in my code:
>
> my $rs = $row->some_relation->search(
> {},
> { where => { rank => { '>' => 0 } },
> order_by => 'rank',
> prefetch => { type => { 'dbxref' => 'db' } } }
> );
>
> Performance with the prefetch is slightly better than with no prefetch at all.
> Appreciate any help!
$schema->storage->_use_join_optimizer(0);
Note - this *will* be deprecated and removed in the future, when the
internals get rewritten to avoid the perl-side penalty. Make sure you
write a specific test to catch the disappearance of this method. It is
not a question of "if" but of "when".
Cheers
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]