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 transactionsFamous 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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |