Hi Thomas,
On 26/11/2011 5:18 AM, Thomas Mueller wrote:
The javax.transaction.xa and javax.sql interfaces are still not fully
supported. Partially this is because I don't understand how the API is
supposed to work exactly. If there is a problem with the behavior,
patches are always welcome (specially test cases).
One glaring problem is needing to restart the DB after handling
in-doubt transactions. Once that's fixed we'd be able to proceed further
and run more extensive tests.
All of them (I believe H2 included) loaded the entire
BLOB into memory
For H2, this is no longer the case (actually since quite a long time).
The last time I checked, it was a problem for MySQL.
Excellent! So what are the downsides of storing large files in the
database? Obviously it's going to be slower than non-transactional files
(by how much?), but is there anything else? Back in the day there used
to be a large disk/memory overhead. For every byte you'd store, it would
use 3x more disk and memory resources. Is that still the case?
On a related note, see http://bugs.mysql.com/bug.php?id=15089 for a
MySQL bug report regarding BLOBs. They've improved the situation but
it's not clear whether it's completely fixed yet.
Another reason I think it might make sense to store files outside of
the database is that I believe it reduces the probability of losing
data.
It depends where else you store the file. If simply on the file
system, then the probability to lose data is higher, because there is
no transaction log for the LOB.
That's why I planned on using XADisk. It provides transactional
filesystem support. However, if you want to modify files at the same
time as the database you need XA to synchronize the two.
H2 first stores the large object in the transaction log (WAL), and
only then in the data area (like all other changes). This is slower
than what other databases do, but it ensures all LOB operations are
transactional.
What do other databases do?
While we're on the topic of WAL, can you answer this question?
http://dba.stackexchange.com/questions/8424/when-do-you-remove-entries-from-a-write-ahead-log-wal
Thanks,
Gili
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.