Hi, I just saw I didn't sent the reply to all...
(1) Perhaps use byte[] as the basic key/value of your interface. This is > the lowest common denominator of java types, and it's easy to wrap String > around it. > I thought about that, but I found ByteBuffer is fine performance-wise, at least on a regular computer. Not sure it that's true for Android as well. One problem is that ByteBuffer can't auto-extend like StringBuilder or ByteArrayOutputStream can, so possibly I will use byte[] at some point, or my own implementation (similar to Data in H2). (2) Probably a good idea to store a per-block CRC. Its amazing how often > corruption manages to sneak through. > There is checksum per page, but just the metadata. This is to detect that a file was modified with a text editor or so, or a file was open in multiple processes, or power failure (old or missing data at the end of a chunk). Checking every byte of the data is quite an overhead. I don't remember seeing a corrupt checksum in a real-world H2 database file that was caused by media failure or power failure. If I implement a checksum, it will be a partial checksums (check every nth bytes) like in the current H2 page store. (3) I see there is per-page compression! Awesome! I have some tables that > are really going to benefit from this. Is the page size configurable? I'm > happy to trade off larger page sizes for more compression. Yes. MVStore supports different page sizes within the same store: you can change it on the fly, so during times when there are many writes it could use a smaller page size (with compression disabled), and for defragmentation it could use large page sizes (and use a better+slower compression algorithm). Currently, page sizes are actually measured in number of entries (not in the number of bytes) by the way. Regards, Thomas -- 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.
