Each element of %Data would be a different transaction anyways.
"Would be"? What do you mean? The way I wrote it, it's in one transaction as it should be.
Unless, of course, you plan on having a 2-million+ insert transaction. That will strain any rollback segment.
*blink* I wouldn't think for a nanosecond to not put them in one transaction. 2 million chances for something to go wrong - better protect myself against it. And since no futher information is available, I'm not going to assume that a partially modified table is acceptable. Besides, it's not only failure you want to protect yourself against - other processes should see a consistent table, and not one where half the rows are modified, and the other half aren't.
And, I can think of a specific case where I know I don't need transactions - a database that is loaded once and will never be written to. In that case, I don't want the overhead of a transaction on my SELECT statements.
Quite a specific case, and not at all applicable to the OP's problem where the database is being modified.

Abigail


In reply to Re: How to Speed up MySQL w/ Perl by Abigail-II
in thread How to Speed up MySQL w/ Perl by rsiedl

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.