Hi guys,

I am a new in the DBIx subject so sorry for my query. It might be 'stupid'  
for someone.

I found in the documentaton about resultset->set_cache &get_cache but i can 
not find how to use it. There is no example? So far about my case:

I have a table which has many relationships with different tables: so the 
query object definition looks like:

$result = $schema->resultset('Genotypes')->search(
        { marker_id.id => [EMAIL PROTECTED],
        { join =>[qw/marker_id genotypes_id genotypesatus_id dataset_id/]}
);

Than i collect data such like:
while(my $line->next) {
        my $marker_name = $line->marker_id->marker_name;
        my $acc_number = $line->genotypes_id->number;
        my $comment = $line->genotypestatus_id->comment;
}

The point is that one loop makes 3 queries to MySQL. Number of records is +/- 
150000 so it gives at least 3*150000 queries to database. I found that a lot 
of queries are the same. 

1)Cos i don't trust mysql cache is set_cache and get_cache a solution for me?
2) How to use it? Do you have any source code for study?

Thanks very much for help,
Jacek

_______________________________________________
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