Hi Fellow monks,
i have a log file which i will extract and make it into sql line which then i insert into a MS SQL 2K database using perl.
The thing is the log file is pretty huge and can grow up to a few hundred K's of lines meaning few hundreds K's of line by line SQL insertion.
I'm trying to speed it up by appending a few hundreds of the sql line at one time and execute using $db->Sql($sql); but what i found was that this method is pretty unstable as i've tried to insert 1K of line but the result varies from 8xx to 9xx but not hitting the exact amount of 1K.
The other way i thought of was to pass the gigantic string to stored proc to execute there as i think that would be more stable but i have a limitation of 4000nvarchar which is too little space..
What would be a better way to do this? Any help would be more than appreciated!!!
thanks in advance.
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.