I am importing a CSV file roughly 390 gig in size. The H2 database (the import is still running) is now at 1.36 TB. Many of the fields in the input file are mapped to numeric values which should be smaller, not larger, than their text representation, i.e, a number like "4.6781234000" becomes a 4-byte value. I suppose there are cases where this could backfire, i.e, if a lot of the values are "0.0" as strings, then we go from three bytes to a minimum of 4 or even 8, depending on how the numeric value is formatted.
There are also a lot of varchar fields, but my understanding is that if a field defined as varchar(50) contains, say, five charcters in a given record, the DB does not 'waste' 45 characters of empty space. So I am wondering if there's some kind of buffering/space reserving mechanism involved, where H2 allocates more space than it needs to speed up future record adds, or otherwise is setting aside space which is not being directly used for data storage? This is something that might be a trivial amount until you start working with these ridiculously large files. -- ======================= Personal Blog: http://www.xanga.com/lizard_sf Facebook: http://www.facebook.com/lizard_sf MrLizard: Gaming and Geekery: http://www.mrlizard.com -- 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.
