Thanks for the confirmation. I will submit a JIRA issue for this then.

Peter

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neville Burnell
Sent: Wednesday, July 09, 2008 12:53 AM
To: [email protected]
Subject: Re: [Jruby-extras-devel] ActiveRecord-JDBC using SELECT identity() 
fromtable

>> SELECT IDENTITY() FROM items;

I believe that SQL statement shouldn't have the "FROM items" clause.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:jruby-extras-
> [EMAIL PROTECTED] On Behalf Of Peter K Chan
> Sent: Wednesday, 9 July 2008 3:06 PM
> To: [email protected]
> Subject: [Jruby-extras-devel] ActiveRecord-JDBC using SELECT
identity()
> fromtable
>
> I have been chasing an out of memory situation in my app, which uses
> the H2 database, and I got it narrowed down to one statement in
> ActiveRecord-JDBC:
>
> SELECT IDENTITY() FROM items;
>
> Result:
> IDENTITY()
> 0
> 0
> 0
> (more rows with same value continues...)
>
> In H2, the above statement seems to return a result set that has
length
> equal to that of the entire table (in this case, a single column
called
> IDENTITY(), with as many rows as the table itself). The items table
> contains tens of thousands of entries and it quickly consumes all the
> memory while executing this particular query.
>
> I don't know very much about SQL, so is this a bug in H2 for returning
> so many rows, or a bug in ActiveRecord-JDBC in using SELECT
IDENTITY(),
> rather than CALL IDENTITY()? (Or a bug in me?).
>
> Peter
> _______________________________________________
> Jruby-extras-devel mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/jruby-extras-devel
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to