Re: [h2] H2 Database Engine: New version released

2023-08-31 Thread Andreas Reichel
Greetings!

I have run your test through all H2 versions and have not been able to
see any material performance deviation:

INFO: 1.3.176: 101681 ms
INFO: 1.4.196: 104554 ms
INFO: 1.4.197: 103474 ms
INFO: 1.4.198: 101421 ms
INFO: 1.4.199: 99655 ms
INFO: 1.4.200: 100125 ms
INFO: 2.0.201: 100645 ms
INFO: 2.0.202: 101761 ms
INFO: 2.0.204: 101122 ms
INFO: 2.0.206: 100877 ms
INFO: 2.1.210: 100627 ms
INFO: 2.1.212: 99316 ms
INFO: 2.1.214: 98967 ms
INFO: 2.2.220: 98540 ms
INFO: 2.2.222: 103886 ms
INFO: 2.2.229: 103005 ms

Those are very rough estimates based
on System.currentTimeMillis() without engaging the JMH benachmarking
tool.
I am still working on a generic Performance Test Framework, which can
read simply Test Case Scripts like the one attached.

In the meantime, please elaborate on your concern since I can't really
confirm it so far.

Best regards
Andreas

-- 
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 h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/0b297f12b1eb881db8d30910d60742c79dec69cd.camel%40manticore-projects.com.
def String[] sqlStr = [
"CREATE TABLE IF NOT EXISTS A (number VARCHAR(128) not NULL, intent INT not NULL, objID VARCHAR(30) not NULL, objType SMALLINT  not NULL, PRIMARY KEY (number,intent,objID,objType));",
"CREATE INDEX IF NOT EXISTS A_IDX ON A(objType,objID,intent);",
"CREATE INDEX IF NOT EXISTS A_type_IDX ON A (objType);",
"DROP TABLE IF EXISTS B; ",
"CREATE TABLE IF NOT EXISTS B (number VARCHAR(128) not NULL, intent INT not NULL, objID VARCHAR(30) not NULL, objType SMALLINT  not NULL, PRIMARY KEY (number,intent,objID,objType));",
"CREATE INDEX IF NOT EXISTS B_IDX ON B(objType,objID,intent);",
"DELETE FROM A T WHERE EXISTS (SELECT NULL from A S WHERE T.objID=S.objID AND T.objType=S.objType AND T.intent=S.intent AND T.number<>S.number);",
"MERGE INTO A T USING (SELECT * FROM B) AS S ON T.objID=S.objID AND T.objType=S.objType AND T.intent=S.intent AND T.number=S.number WHEN NOT MATCHED THEN INSERT (objID, objType, number, intent) VALUES (S.objID, S.objType, S.number, S.intent);",
"DROP TABLE B CASCADE"
]

statement.execute(sqlStr[0]);
statement.execute(sqlStr[1]);
statement.execute(sqlStr[2]);

for (int loop = 0, number = 0; loop < 300; ++loop) {
statement.execute(sqlStr[3]);
statement.execute(sqlStr[4]);
statement.execute(sqlStr[5]);

for (int i = 0; i < 100; ++i) {
++number;
statement.execute("MERGE INTO B (number,intent,objID,objType) VALUES ('"
+ number
+ "',1, '"
+ number
+ "', 1);");
}
statement.execute(sqlStr[6]);
statement.execute(sqlStr[7]);
statement.execute(sqlStr[8]);

logger.info "loop = $loop"
}



Re: [h2] Re: Create Table Problem (Upgrading from 1.4.x)

2023-08-31 Thread 'Peter Borissow' via H2 Database
 Thank you Evgenij,    Adding the following properties definitely helped:

properties.setProperty("MODE", 
"PostgreSQL");properties.setProperty("DATABASE_TO_LOWER", "TRUE");
properties.setProperty("NON_KEYWORDS", "KEY,VALUE");
properties.setProperty("DEFAULT_NULL_ORDERING", "HIGH");

I am able to create a new database and load my schema :-)
I have a new issue in my code related to connection pooling but I'll save that 
for a new thread if I can't figure it out.
Thanks Again,Peter


On Wednesday, August 30, 2023 at 08:25:25 PM EDT, Evgenij Ryazanov 
 wrote:  
 
 Hello.

In modern versions of the SQL Standard KEY is really a non-reserved word, but 
it was a mistake to exclude it from the list of reserved words, because in some 
contexts you still cannot use it as identifier, even the SQL Standard itself 
has at least one such documented exclusion appeared in ISO/IEC 9075-2:2016 
TECHNICAL CORRIGENDUM 2.

Definition of your table also has a VALUE column, but VALUE is a reserved word 
in the SQL Standard and it is a keyword in H2.

If you cannot rename these columns, you can add `;NON_KEYWORDS=KEY,VALUE` to 
JDBC URL. It also should have 
`;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE;DEFAULT_NULL_ORDERING=HIGH` if you 
want a better compatibility with PostgreSQL. Alternatively you can pass these 
settings in the map with properties.


-- 
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 h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/7756da35-d074-439e-af77-33adc7a4bbd6n%40googlegroups.com.
  

-- 
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 h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/391768309.2471969.1693488629604%40mail.yahoo.com.