Hi Monks

In my current project, i am using DBI to connect to oracle database. I have 6 different queries in 6 different .sql files. My perl file reads each .sql file one by one, and sents it to DBI module.

But since the queries executes one by one, the total execution time is around 23-25 minutes. I have to reduce this. The maximum execution time for one of query (which i found out) was around 10 minutes. Others are anything between 1-6 minutes.

I would like to use Multithread and call each query on a thread so that my program execution time gets reduced to 10 minutes.

I am expecting a suggestion from Monks whether i am in write direction and also to suggestion me how to go about this.

SORRY I AM UNABLE TO ATTACH MY CODE AS ITS TOOO LONG

Thanks in advance


In reply to Multithreading and DBI by knsridhar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.