When our users update to the latest version of our desktop software that uses H2, we need to add several columns to a table with many columns that may have millions of rows. Some people have been getting an OutOfMemoryException during this process.
I've analysed this problem, and checked the H2 source code for ALTER TABLE ADD. It seems that the high RAM usage is occurring during the data copying step. I'm looking for an alternative solution. Two I've thought of: 1) Manually create a replacement table, then using JDBC, fetch each existing row, inserting it into the new table. 2) Dump the current table to CSV file, then create the new table with the additional columns, and import from the CSV file Before I try these different approaches, do you have any thoughts on which might be better, or whether an alternative approach may work? -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.