Your best bet is to use the OFFSET and LIMIT clauses to reduce the
amount of data you are requesting.
On 2013-03-07 23:03, MG wrote:
Hello!
I'm trying to use H2 as an embedded database in my Android app, and I
have encountered the following problem:
I'm importing a DB from a server, row by row (or bunches of rows -
does not matter).
The DB has one relatively large table, with thousands of rows. The VM
heap size is limited in Android, and with default settings I get an
OOM exception. I managed to import the DB anyway by adding
CACHE_SIZE=64 to the connection string. The size of the DB is about
50MB after the import.
When I later try to open/query the DB with default settings, I get an
OOM exception. When I add CACHE_SIZE=xyz, regardless of xyz, H2 driver
hangs, and Android logs show constant GC work. I assume it loads and
flushes the cache in a loop.
Question: can I use H2 to access tables much larger than the VM heap
size? How?
Thanks,
MG
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.