Re: [h2] Multiple independent H2 databases within one JVM

2015-07-01 Thread Ryan How
Yep no probs at all. You can have multiple databases open at the same time and open and close them on different threads as you like. You'll just need to do the appropriate connection handling linked to the session open / close. Scaling is going to depend on your application architecture too.

[h2] Multiple independent H2 databases within one JVM

2015-07-01 Thread Basil Bourque
Is it possible to start up and shut down multiple H2 databases within a JVM? My goal is to support multi-tenancy by giving each user/account their own database. Each account has very little data. Data betwee

Re: [h2] MVStore with MVCC performance degradation

2015-07-01 Thread Wes Clark
(Sent as a separate private email to thomas.tom.muel...@gmail.com.) Here is the trace files that I hope let you see why the newer version of H2 can be much slower that the old one. I ran a suite of four or five test classes with various test methods from the suite that I mentioned times ou

[h2] Re: user-defined aggregate function FIRST() and LAST()

2015-07-01 Thread google
For me it works fine now: package code.lib.h2; public class First implements org.h2.api.AggregateFunction { int count = 0; Object result; Object order; @Override public void init(java.sql.Connection cnctn) throws java.sql.SQLException { // I ignored this } @

[h2] Re: JDBC URL for file database

2015-07-01 Thread Wes Clark
Adding "c:" to the start of the file specification worked. That is a change from the old 1.2 behavior? On Tuesday, June 30, 2015 at 5:53:04 PM UTC-7, Wes Clark wrote: > > I'm using the tip of your nightly builds as of about two weeks ago. I can > run in mem mode, but when I try to run in file

[h2] Re: user-defined aggregate function FIRST() and LAST()

2015-07-01 Thread google
Hi! I found out that you can implement a user-defined aggregate function with TWO parameter, e.g. first with the value searched for and the second for ordering, e.g. SELECT FIRST(name, id) and an implementation for Integer for value and sort type like this: package myh2; public class First i

Re: [h2] Where is org.h2.upgrade.v1_1.Driver ?

2015-07-01 Thread Thomas Mueller
Hi, This is in a separate jar file, you can download it from here: http://h2database.com/html/download.html - "Database Upgrade Helper File". It is needed to upgrade a (very old) H2 version 1.1 database file to version 1.2. Regards, Thomas On Monday, June 29, 2015, Ivan Codescratch wrote: >

Re: [h2] JDBC URL for file database

2015-07-01 Thread Thomas Mueller
Hi, On Windows, you would need to add the drive letter: c:/tmp/... Regards, Thomas On Wednesday, July 1, 2015, Noel Grandin wrote: > Hi > > What version of Java is this? And what operating system (and version > thereof) ? > > And can you run a quick small test program on this system using th

Re: [h2] Select on select ordered by rand not returning values in H2 1.4.187

2015-07-01 Thread Thomas Mueller
Hi, I don't know yet what the problem could be, but I have a slightly simpler test case: drop table test; create table test(id int); insert into test values(1); select * from test where id in (select id from test); select * from test where id in (select id from test order by null); In theory, "o

[h2] Select on select ordered by rand not returning values in H2 1.4.187

2015-07-01 Thread Quentin Farizon
Hello, I have a certain query that is working in H2 1.3.173 but not in H2 1.4.187. Here is the test case (it is part of a bigger use case, it's normal that these queries don't necessarily make sense functionally) : CREATE TABLE MY_TABLE (MY_DOUBLE DOUBLE); INSERT INTO MY_TABLE VALUES (1.0); INS

Re: [h2] user-defined aggregate function FIRST() and LAST()

2015-07-01 Thread Noel Grandin
Hi Sorry, at the moment that is not possible. Alternatively, you could use the SELECT .. LIMIT 1 and SELECT ... ORDER BY .. DESC LIMIT 1 syntax to do the same thing. -- Noel. On 2015-07-01 06:19 AM, goo...@ghel-mail.com wrote: Hello! Unfortunately there exist no built-in aggregate funct

Re: [h2] JDBC URL for file database

2015-07-01 Thread Noel Grandin
Hi What version of Java is this? And what operating system (and version thereof) ? And can you run a quick small test program on this system using this version of java that does: System.out.println(new java.io.File("/tmp/guidewire/ferrite/px").isAbsolute()); System.out.println(new java