Am Montag, den 12.01.2009, 14:37 +0200 schrieb Bogdan Lucaciu:

> try this instead:
> 
> sub dbic_HashRefInflator {
>     my $resultset = $schema->resultset('MyAppDB::Request')->search(;
>         {message_id => \"IN (173, 174, 171, 1, 168, 144, 177, 111, 178,
> 172, 95, 196, 179)"},
>         {
>          columns=>[qw/ id message_id created status amount /] 
>         },      
>         );
> $resultset->result_class('DBIx::Class::ResultClass::HashRefInflator');
> @req = $resultset->all;
> }
> 

Thanks a lot, that worked.

For whom it may concern, this is the new benchmark:

            (warning: too few iterations for a reliable count)
                   Rate            dbic hashrefinflator       plain_dbi
dbic            0.154/s              --            -96%           -100%
hashrefinflator  3.87/s           2408%              --            -99%
plain_dbi         625/s         405225%          16063%              --


Jochen


_______________________________________________
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]

Reply via email to