[Dbix-class] Static / reference data
Thomas Klausner
domm at cpan.org
Wed Aug 22 18:50:45 GMT 2018
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$_.$/}
More information about the DBIx-Class
mailing list