Thomas, Interesting results, 1024 page size make a difference. But what really disfigured HJ comparisons is the character encoding.
STRINGTOUTF8(@biodata) function returns a byte array of 3412 bytes instead of 1706 bytes, ast should do in UTF8 when no characters requiring double byte encoding. Look carefully the sample data sent and notice that it is 7-bit ASCII. If you create a text file with this content in ASCII or UTF8 encoding will occupy 1708 bytes; and in UTF16, the same content occupies 3414 bytes. It seems that this function is converting UTF16 instead of UTF8. Or maybe we need and String to RAW function ? regards, Dario. El 24/10/10 12:29, Thomas Mueller escribió: > There are few things to consider: > > - use the binary data type (not varchar and not blob or clob) > - the "deflate" compression algorithm compresses a lot better > - the page size is very important > - sorted insert doesn't make a big difference in my test case > > My test case: > http://h2database.com/p.html#f83c8de69e95377b16eec46f9210df14 > > The results are: > > lzf, regular insert > Page size: 1024 - database file size: 8.26 MB > deflate, regular insert > Page size: 1024 - database file size: 4.16 MB > deflate, sorted insert > Page size: 1024 - database file size: 4.16 MB > Page size: 128 - database file size: 4.75 MB > Page size: 256 - database file size: 4.21 MB > Page size: 512 - database file size: 4.45 MB > Page size: 1024 - database file size: 4.16 MB > Page size: 2048 - database file size: 8.26 MB > Page size: 4096 - database file size: 8.25 MB > Page size: 8192 - database file size: 4.75 MB > Page size: 16384 - database file size: 4.23 MB > Page size: 32768 - database file size: 4.25 MB -- 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.
