Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Out of Memory when generating large matrix

by alexander_lunev (Pilgrim)
on Mar 05, 2018 at 07:07 UTC ( [id://1210340]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    1 the only
    2 significant
    ...
    9 first 
    10 space 
    11 character
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    foreach my $k (keys %sum){
        print $OUT "$sum{$k}\n";
    }
    
  3. or download this
    CREATE DATABASE kmers;
    CREATE TABLE matrix (file int, number int, key (file), key (number));
    
  4. or download this
    use DBI; 
    my $dbh = DBI->new('DBI:mysql:database=kmers;host=127.0.0.1','mysql_us
    +er','');
    ...
    }
    $sth->finish();
    
  5. or download this
    
    my $count_query = "SELECT number,COUNT(number) FROM matrix GROUP BY nu
    +mber ORDER BY number";
    $sth = $dbh->prepare($count_query);
    
  6. or download this
    #sum up
    #foreach my $k (keys %sum){
    ...
    while (my $res = $sth->fetchrow_arrayref()) {
       print $OUT $res->[1]\n";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1210340]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-19 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found