Hi!

On Wed, Aug 22, 2018 at 07:14:39PM +0100, Andy Armstrong wrote:
 
> With DBIC every call to $prog->service->name results in a query 
> against services - so for a page of 20 search results that's 20 
> additional queries. Even on a single page it's often the case that 
> many of those queries are searching for the same service.

Take a look at 'prefetch', which will fetch all of the data from the 
related table, so your search will be again one query only.

Greetings,
domm

-- 
#!/usr/bin/perl                              http://domm.plix.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

_______________________________________________
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/dbix-class@lists.scsys.co.uk

Reply via email to