Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: How to increase the efficiency of the code wen working with DB?

by tospo (Hermit)
on May 27, 2011 at 08:37 UTC ( #906958=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How to increase the efficiency of the code wen working with DB?
in thread How to increase the efficiency of the code wen working with DB?

That doesn't look too bad but of course you have to do the last one almost 400000 times, so that will take a while. I haven't looked at your queries too closely but is there a reason why you need to issue a query for genotypes with a single sample and a single snp instead of querying for all samples IN (...) and all snps IN (...) in one go? That should be a lot faster. You can associated sample, genotype and snp in your perl script by parsing the results. Other than that I would still look at the indices, which might not be optimal for your queries, and also at the sorting you let the DB do - that too will take time and might not be necessary, depending on how you use the data afterwards.


Comment on Re^3: How to increase the efficiency of the code wen working with DB?
Re^4: How to increase the efficiency of the code wen working with DB?
by Anonymous Monk on May 31, 2011 at 14:02 UTC
    Hi Topso, Thanks , I have checked with the indices and thats solved now. Thanks For pointing them .

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2014-07-12 23:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (242 votes), past polls