[h2] ALTER TABLE ADD uses too much memory
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.
Re: [h2] ALTER TABLE ADD uses too much memory
On 2015-01-06 12:50 PM, Steve McLeod wrote: 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. That is rather odd, since H2 should be creating a temporary table if the result-set gets too big. I do this all the time, and I don't have OOM problems. It sure can take a long time though, which I have some suggestions for, but first lets sort out this bug. What does your H2 URL look like, and what does your ALTER TABLE statement look like? 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. Can you be more specific - what data-structure is using up memory and what section of H2 code? -- 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.
[h2] What is kept in PageStores and when is it released ?
We have put a new (H2-based) product live. Now the numbers of users are growing, the memory consumption also grows. JVisualVM learns us that the top 20 memory consuming objects are org.h2.store.PageStore#xx and org.h2.util.CacheLRU#xx Could someone explain what is kept in these objects ? when will they being released ? regards, Rinse -- 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.
[h2] Please suggest, I am getting this error while I am doing Maven clean install on my project. Thanks in advance.
[java] generateScript: [java] [eclipse.buildScript] Some inter-plug-in dependencies have not been satisfied. [java] [eclipse.buildScript] Bundle org.h2: [java] [eclipse.buildScript] Unsatisfied import package javax.servlet_0.0.0. [java] [eclipse.buildScript] Unsatisfied import package javax.servlet.http_0.0.0. [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.analysis_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.analysis.standard_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.document_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.index_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.queryParser_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.search_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.store_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.util_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package com.vividsolutions.jts.geom_1.13.0. [java] [eclipse.buildScript] Unsatisfied import package com.vividsolutions.jts.io_1.13.0. [java] [eclipse.buildScript] Unsatisfied import package org.h2_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.api_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.fulltext_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.jdbcx_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.tools_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.util_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.value_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.osgi.service.jdbc_1.0.0. [java] [eclipse.buildScript] Unsatisfied import package org.slf4j_[1.6.0,1.7.0). -- 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.
[h2] Please suggest for this error, When I am doing Maven clean install on my project getting this error. Thanks in advance.
[java] generateScript: [java] [eclipse.buildScript] Some inter-plug-in dependencies have not been satisfied. [java] [eclipse.buildScript] Bundle org.h2: [java] [eclipse.buildScript] Unsatisfied import package javax.servlet_0.0.0. [java] [eclipse.buildScript] Unsatisfied import package javax.servlet.http_0.0.0. [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.analysis_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.analysis.standard_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.document_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.index_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.queryParser_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.search_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.store_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package org.apache.lucene.util_[3.0.0,3.1.0). [java] [eclipse.buildScript] Unsatisfied import package com.vividsolutions.jts.geom_1.13.0. [java] [eclipse.buildScript] Unsatisfied import package com.vividsolutions.jts.io_1.13.0. [java] [eclipse.buildScript] Unsatisfied import package org.h2_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.api_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.fulltext_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.jdbcx_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.tools_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.util_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.h2.value_[1.3.176,1.4.0). [java] [eclipse.buildScript] Unsatisfied import package org.osgi.service.jdbc_1.0.0. [java] [eclipse.buildScript] Unsatisfied import package org.slf4j_[1.6.0,1.7.0). .. ... ... [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to execute: Executing Ant script: /plugin.build.xml [pde-builder]: Failed to execute. -- 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.
[h2] Pivot Request
Hello, I have a table LINE(ID, NAME) AND a table TAG(ID, LINEID, TAG, VAL). Here is a example of content : - Table LINE ID|NAME | 1 |TEST1| 2 |TEST2| - Table TAG ID|LINEID|TAG|VAL| 1 |1 |A |ABC| 2 |1 |B |456| 3 |1 |E |789| 4 |2 |A |123| 5 |2 |B |147| 6 |2 |C |258| 7 |2 |D |369| I want to make a request which return tags as column like below : NAME |A |B |C |D |E | TEST1|ABC|456| | |789| TEST2|123|147|258|369| | Is it possible to use Pivot with H2? Thanks, Phil -- 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.