If your one-statement transaction fails, nothing has actually occurred to change the state of the tables involved.
It would only be a one-statement transaction if %Data contains less than two elements. It's unlikely that that is the common case.

Transactions are a bit like "use strict" (except they prevent you from real harm). While there are cases you don't need "use strict", it's a good idea to get into the habit of using them, and only in special cases you don't use them.

By using a table type that doesn't have transactions
... you have committed yourself to never be able to use transaction on modifications of that table. Why bother with a database in such a case? Might as well use a bunch of DBM files.
If you don't need transactions
Famous last words, and belongs in the series "we don't need backups", "we don't need redundancy", "we don't need to look around when crossing the street". And indeed, most of the time, you don't need them. You just never know when you do.

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.