Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Searching and Coutning using 2 files with multiple columns

by moritz (Cardinal)
on Feb 19, 2010 at 16:56 UTC ( [id://824202]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Searching and Coutning using 2 files with multiple columns
in thread Searching and Coutning using 2 files with multiple columns

There are lots of ways in which you can improve your code.

The first is to tell mysql to build indexes on the chrom and the start columns. The second is to use prepared statements and execute() as show in the DBI documentation and in this tutorial.

If you use the RaiseError option in DBI->connect, you can leave out the ||die and get much better error messages.

It actually stops in a wierd way, like if the actual count is 30, it will only print 3. How do I deal with this?

How does it "stop"? Does it hang? or does it terminate? What is the exit code? does it run out of memory or disk space?

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^4: Searching and Coutning using 2 files with multiple columns
by shart3 (Novice) on Feb 19, 2010 at 17:52 UTC

    It would just hang. It ended up running all night. The processor was still processing, but I wasn't getting any data out. I will try to index my MySQL table to make it run faster. I have to learn how to do it, but for now I am doing

    mysql> create index Chr_start_end using btree on H3K36me3 (chrom,start,end)

    Thanks for the suggestion!

Re^4: Searching and Coutning using 2 files with multiple columns
by shart3 (Novice) on Feb 19, 2010 at 18:08 UTC
    Building the index worked! Thanks again!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 16:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found