[CDBI] I feel the CLASS::DBI performance is very bad.

Mike Whitaker mike at mindcandydesign.com
Mon Nov 21 08:49:57 GMT 2005


On 21 Nov 2005, at 08:42, James Zheng wrote:

> Just did some tests with CLASS::DBI,  I feel the CLASS::DBI  
> performance is very bad if we use some default methods.
>
> For example:  I used the "search" method by "XXX->search 
> (active=>1)", I got the SQL log.
>
> select usr_id from XXX where active=1
>
> select username from XXX where usr_id=n0
> .............
> select username from XXX where usr_id=nn
>

You got bitten by the same thing I did. If you frequently access  
certain columns from XXX when you do a search, do:

XXX->columns(Essential => qw/list of essential columns/);

and the Right Thing will happen.




More information about the ClassDBI mailing list