Hello k_manimuthu,
It is strange how you call your insert script that fast that MySQL is not able to handle the insert statements. The easy way for me would be to connect your scripts either by creating loops and when you reach the end of the loop call next insert.
Alternatively you can use Thread::Queue. But I would first try to see if I can create an OO approach for the insert statements instead of calling the script by each self.
But this is my idea on how to approach the problem, maybe another monk has another idea.
Update: You can also in case you use the MySQL DB you can call the function INSERT ... ON DUPLICATE KEY UPDATE Syntax.
Update2: Or as fellow monk hippo proposed Ensuring only one copy of a perl script is running at a time.
Hope this helps, BR.
Seeking for Perl wisdom...on the process of learning...not there...yet!
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.