On May 21, 12:41 pm, Thomas Mueller <[email protected]> wrote: > Hi, > > > Should I be concerned with the CACHED/MEMORY option in your opinion? > > If you are not sure how large the table will be, use CACHED. I will > probably make that the default in a future release (but not now). > > > I am actually running into issues in our testsuite if I try to specify > > CACHED (the table is not found after creation). Perhaps CACHED here > > wont work if using an in-memory DB? H2 throws no exception and gives > > no warnings though... > > That's strange, what kind of issues?
Like I said in the follow up, the tables are actually created. I can insert into them. I can select from them. But for some odd reason as soon as I try to delete from them I get an error that the table cannot be found. As we discussed, the creation happens on a separate connection; but all the DML is happening on the single main connection. Thats what makes this so strange. Literally all I change is to remove "cached" from the CREATE TABLE statement and it all works. I would like to use CACHED as I said before, since my reading of the docs seemed to indicate that would be the best option for this case. But obviously I need to go with what "works" (though obviously the solution as is is only going to work for non-concurrent type access). > > GLOBAL temp tables... Do they maintain which session/connection inserted > > rows? > > No. Now that I read the Oracle documentation, I see H2 behaves > differently... I didn't know about that (and nobody told me about this > so far). Unfortunately it will take some time until I can fix this. Oracle does this only because they do not support a true ANSI SQL local temp table. Their global temp table, however, behaves like one because of it auto tracking the sessionid. Personally I'd be much happier with a change to not have creation of (at least local) temp tables cause the implicit transaction commit. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
