akarshan2701 / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Large rows "GROUP BY" #216

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Before submitting a bug, please check the FAQ:
http://www.h2database.com/html/faq.html

What steps will reproduce the problem?
(simple SQL scripts or simple standalone applications are preferred)
1.create table t1(id int)
2.create table t2(id int)
3.insert into t1(id) select x from system_range(0,4999999)
4.insert into t2(id) select t1.id from t1 group by t1.id

insert into t2(id) select t1.id from t1 group by t1.id;
メモリが不足しています
Out of memory.; SQL statement:
insert into t2(id) select t1.id from t1 group by t1.id [90108-140] 90108/90108 
(Help)
org.h2.jdbc.JdbcSQLException: メモリが不足しています
Out of memory.; SQL statement:
insert into t2(id) select t1.id from t1 group by t1.id [90108-140] 
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) 
    at org.h2.message.DbException.get(DbException.java:156) 
    at org.h2.message.DbException.convert(DbException.java:273) 
    at org.h2.command.Command.executeUpdate(Command.java:219) 
    at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:176) 
    at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:151) 
    at org.h2.server.web.WebApp.getResult(WebApp.java:1310) 
    at org.h2.server.web.WebApp.query(WebApp.java:1003) 
    at org.h2.server.web.WebApp$1.next(WebApp.java:966) 
    at org.h2.server.web.WebApp$1.next(WebApp.java:955) 
    at org.h2.server.web.WebThread.process(WebThread.java:161) 
    at org.h2.server.web.WebThread.run(WebThread.java:88) 
    at java.lang.Thread.run(Thread.java:619) 
Caused by: java.lang.OutOfMemoryError: Java heap space 
    at org.h2.command.dml.Select.queryGroup(Select.java:326) 
    at org.h2.command.dml.Select.queryWithoutCache(Select.java:574) 
    at org.h2.command.dml.Query.query(Query.java:241) 
    at org.h2.command.dml.Insert.insertRows(Insert.java:127) 
    at org.h2.command.dml.Insert.update(Insert.java:82) 
    at org.h2.command.CommandContainer.update(CommandContainer.java:70) 
    at org.h2.command.Command.executeUpdate(Command.java:199) 
    ... 9 more 

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system, file
system, and virtual machine?
H2: Head(r2839)
OS: Windows XP SP3
Java: 1.6.0_20

Do you know a workaround?

No

How important/urgent is the problem for you?

Not so urgent

In your view, is this a defect or a feature request?

Defect

Please provide any additional information below.
---h2w.bat---
@start %JAVA_HOME%/bin/javaw.exe -server -Xms512m -Xmx512m 
-Dh2.largeTransactions=true -cp "h2-1.2.140.jar;%H2DRIVERS%;%CLASSPATH%" 
org.h2.tools.Console %*
---JDBC URL---
jdbc:h2:test

Original issue reported on code.google.com by byouinza...@gmail.com on 28 Jul 2010 at 10:28

GoogleCodeExporter commented 8 years ago
Hi,

Thanks for reporting this issue. I have added it to the roadmap. It will be 
implemented eventually, but currently the priority is relatively low.

Original comment by thomas.t...@gmail.com on 2 Aug 2010 at 12:15

GoogleCodeExporter commented 8 years ago
It is already on the roadmap.

Original comment by thomas.t...@gmail.com on 2 Nov 2010 at 7:32