[Dbix-class] lazy loading of column data

Matt S Trout dbix-class at trout.me.uk
Mon Jun 8 19:25:26 GMT 2009


On Tue, Jun 02, 2009 at 05:18:56PM +0200, Hermida, Leandro wrote:
> Hello,
> 
>  
> 
> I looked through the DBIC list archives and on the web, cannot find
> anything recent or in the documentation about marking certain columns
> for lazy loading of their data (i.e. only right when accessor on
> particular object is called).  Is there some flag for this in DBIC?

Class::DBI did that. Every single time I've ever seen it used, it resulted
in a shedload of SELECTs and awful performance.

You can tell DBIC to only load specific columns.

The correct thing to do is to tell DBIC which columns you want in the first
place on any given query.

-- 
        Matt S Trout         Catalyst and DBIx::Class consultancy with a clue
     Technical Director      and a commit bit: http://shadowcat.co.uk/catalyst/
 Shadowcat Systems Limited
  mst (@) shadowcat.co.uk        http://shadowcat.co.uk/blog/matt-s-trout/



More information about the DBIx-Class mailing list