Be mindful of maintaining integrity in your data. If you decide to drop the indices for importing (which does increase the speed) then the responsibility of integrity falls to you the importer.

Turning Autocommit off is a great idea, which also speeds things up. However , unless you are certain your data is clean you may well want to turn autocommit off but commit on every valid transaction and rollback on invalid ones like so

eval{$sth->execute("BLAH")} if($@) { $dbh->rollback(); } else { $dbh->commit(); }
but with bulk insert I don't know if that's so much an option... so in other words you've gotta make sure that data is clean at some point in the process. your data importation method helps determine when this cleaning takes place.

MS-SQL does have a BULK INSERT command that I'm aware of, check your docs, they are actually pretty good

Best of luck on your problem,

In reply to Re^2: Parse Logfile and Bulk Insert by Grygonos
in thread Parse Logfile and Bulk Insert by mkirank

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.