[h2] Re: What's the recommended way to migrate from H2 1.3.175 to 1.4.195

2017-05-10 Thread Steve McLeod
Hendrik, I've answered your question in detail on StackOverflow. On Friday, 5 May 2017 17:29:02 UTC+2, hendrik wrote: > > Hey there, > > asked this on Stackoverflow > > > the other

[h2] Re: underscore in table name and czech collation

2017-02-27 Thread Steve McLeod
Hi Ivo, This problem caught my eye, because I'm fascinated by code problems that occur with obscure causes. However I've been unable to reproduce the problem. I've tried in the H2 web console and I've tried using Java code. Can you please post a self-contained source code example that I

[h2] Re: connecting to h2 from non-java languages

2017-02-24 Thread Steve McLeod
+1 for Spark. It is one of the few tech products that is truthful when it says, "you'll have your first example running in five minutes". The solution you propose would involve would establish a connection for each query? I'd imagine that would not perform too well. I suggest establishing a

[h2] Re: Schema "XXXX" not found; SQL statement: GRANT SELECT ON SCHEMA XXXX TO USERX [90079-192]

2017-02-20 Thread Steve McLeod
Can you reproduce this in a small stand-alone Java program? If so, it does seem like a bug and you should report as an issue here: https://github.com/h2database/h2database/issues Make sure to post the repro code. On Monday, 20 February 2017 09:20:38 UTC+1, Ashok Rai wrote: > > Hi Kerry, >

[h2] I'm no longer able to offer H2 commercial support; can you?

2017-01-21 Thread Steve McLeod
. This is an opportunity for someone else who knows H2 well. I typically receive a few serious enquiries per year. They involve trying to fix corrupted databases, advising on how best to use H2, or offering an ongoing SLA. Is anyone interested in taking over? Regards, Steve McLeod -- You received

[h2] Re: Unhandled exception parsing date

2017-01-10 Thread Steve McLeod
Can you please post a reproducible test case? A complete SQL statement one could use to reproduce the problem would be great. On Monday, 9 January 2017 19:45:44 UTC+1, Mike G wrote: > > Stack trace below. The sql itself is massive so I've edited it out. > Presumably the handling could just be

Re: [h2] Re: Index hints

2017-01-06 Thread Steve McLeod
n the list is chosen, in which case a > full table scan will be used. > > It looks like this is what MySQL is doing, so that's fine. > > Regards, > Thomas > > > On Thu, Jan 5, 2017 at 9:48 AM, Steve McLeod <steve@gmail.com > > wrote: > >> MySQL syntax se

[h2] Re: H2 - Throwing Syntax Error for Create Alias

2017-01-05 Thread Steve McLeod
Here's what happened: 1) You created a database with an older H2 jar and added a user-defined function (UDF) 2) You updated your H2 jar to a newer version that has a built-in function that has the same name as your user-defined function 3) Now H2 gets a bit confused at start up because it tries

[h2] Re: Index hints

2017-01-05 Thread Steve McLeod
n't do this as part of this change. With this enhancement I'm trying to solve one of my own performance issues. Any feedback on this proposed solution? On Wednesday, 4 January 2017 13:13:15 UTC+1, Steve McLeod wrote: > > I'm considering attempting to add index hints to H2. >

[h2] Index hints

2017-01-04 Thread Steve McLeod
I'm considering attempting to add index hints to H2. Questions: * Is this a good idea? Or is it better to work on making the query optimizer smarter at choosing the correct index? * Is Oracle's syntax preferable? Or MySQL's syntax? Or is there a better syntax altogether? Oracle: SELECT /*+

[h2] Use memory database and use file for persist and for next restart

2017-01-03 Thread Steve McLeod
I don't believe this is supported. Instead you can use a file URL, with a large value specified for CACHE_SIZE. Read more about cache size here: http://www.h2database.com/html/grammar.html#set_cache_size -- You received this message because you are subscribed to the Google Groups "H2

[h2] H2 in memory impl - restart after ~300000 inserts with empty database. why????

2017-01-03 Thread Steve McLeod
Starting your JDBC URL with "jdbc:h2:mem:" tells H2 you want an in-memory non-persisted database. If you want a database persisted between sessions, use a URL that starts with jdbc:h2:file: The syntax of the H2 JDBC URL is explained here:

[h2] Re: full join alternative for h2

2016-12-26 Thread Steve McLeod
I guess this is what you want: SELECT ... FROM tableA a OUTER JOIN tableB b on a.date = b.date On Saturday, 24 December 2016 13:11:22 UTC+1, Christian Master wrote: > > Hi, > i have > tableA (date, moneyIn) > > tabelB (date, moneyOut) > > i need > select a.date, a.moneyIn, b.moneyOut > from >

[h2] Re: The last stable release Version 1.3.176 was published at 2014-04-05, when will 1.4.x stable version release?

2016-12-21 Thread Steve McLeod
Leon, Although not marked stable, 1.4 with the page store (MV_STORE=false in JDBC URL) works better than 1.3.176 in many ways, and as good as 1.3.176 in all other ways. I'm willing to state this because my product (Poker Copilot) has been using H2 since 2009 with thousands of users. As of

[h2] Re: H2 Documentation - missing information

2016-12-13 Thread Steve McLeod
> It seems the H2 is lack of documentation. I think this is somewhat unfair. H2 has comprehensive documentation describing every datatype, function, and SQL grammar component, all maintained and kept up to date. There's always an accurate change log and road map. This is an open source

Re: [h2] Re: Very slow calculateCost

2016-12-08 Thread Steve McLeod
Your query is extreme. Hundreds of joins, dozens of nested selects. Way too big, and way too complicated. You'll never get any decent performance with a query like that, nor will you ever be able to analyse and understand the reasons for the performance problems. The solution to your problem

[h2] Is Java 7 the new H2 baseline Java version?

2016-11-11 Thread Steve McLeod
Hi all, I might have missed this when announced or discussed, but I get the impression that we're no longer aiming for Java 6 compatibility as of H2 1.4.193. Is that correct? Regards, Steve -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

[h2] Re: The date of next 1.4 release

2016-10-21 Thread Steve McLeod
While waiting for a release, it is surprisingly straightforward to make your own build, assuming you are familiar Git, GitHub, and running shell scripts. 1. Clone locally the H2 GitHub repo 2. In the local clone of the repo, do the following (assuming bash on Linux or macOS, on Windows, it is

[h2] help picking H2 version

2016-10-21 Thread Steve McLeod
You asked this in another thread and my answer was straightforward and clear, I thought. Use only the latest version of H2 1.4 if you want to use the MVStore. Currently that is 1.4.192. There is no version of H2 1.4 marked as stable but you did ask what version of 1.4 you should use. --

[h2] Re: Main differeces between 1.3 and 1.4 versions

2016-10-20 Thread Steve McLeod
Only the latest (H2 1.4.192) On Tuesday, 18 October 2016 23:44:43 UTC+2, Adam McMahon wrote: > > Good info here > > So, what version of 1.4x would you use in your production environment. I > use pagestore for JDBC, but am also going to be integrating MVSTORE via the > map api (not JDBC) using

[h2] Re: Main differeces between 1.3 and 1.4 versions

2016-10-20 Thread Steve McLeod
A good summary. Let me add some more info. * 1.4 can be used for production same as 1.3 when > ;MV_STORE=FALSE;MVCC=FALSE is appended to JDBC URL (MVCC is now disabled > when not using MV_STORE - so potetionally can be omited) > Appending ;MV_STORE=FALSE to the JDBC URL is enough to use the

[h2] Re: Is there a way to create an UNIQUE INDEX in H2?

2016-10-07 Thread Steve McLeod
H2 does restrict inserts according to UNIQUE index constraints. Can you post complete reproduction steps? On Wednesday, 5 October 2016 18:44:38 UTC+2, Rodrigo wrote: > > I'm trying to add this statement in my h2 script: > > CREATE UNIQUE INDEX "SOME_NAME" ON "SOME_TABLE_NAME" (COLUMN1,COLUMN2)

[h2] Re: Error while executing query "Subquery is not a single column query; SQL statement:"

2016-10-07 Thread Steve McLeod
Have you tried concatenating the two columns into one column? I don't know if that would work, just an idea. PS: I think you'd have more success finding a solution if you post this on stackoverflow.com On Wednesday, 5 October 2016 09:14:06 UTC+2, Ramesh Elkaturi wrote: > > Hi all, > > >

[h2] Re: Clound Server for H2

2016-10-04 Thread Steve McLeod
What is a Clound Server? Did you mean Cloud Server? If so, can you describe in more detail what you are looking for? On Saturday, 1 October 2016 21:18:48 UTC+2, Pedro Gentil wrote: > > Hi. > > Are there a Clound Server solution for H2? > > > Thanks > -- You received this message because you

[h2] Re: Maven build issues

2016-09-15 Thread Steve McLeod
Hi Hendrik, If you have the time, please do fix any of these problems that you can. The Maven configuration was added recently, and I don't think it is used actively by most contributors. Yet! On Tuesday, 13 September 2016 09:47:29 UTC+2, hendrik wrote: > > Hey there, > > I was trying to

[h2] Re: Quickly adding multiple columns at a certain position

2016-09-10 Thread Steve McLeod
Hi Hendrik, I added the multiple column version due to a similar performance problem I was facing four years ago. I think you have two options: 1) patch the code that implements the multiple column version of ALTER TABLE ADD COLUMN. It is in org.h2.command.ddl.AlterTableAlterColumn. If you

Re: [h2] Shall I add H2 to Travis CI?

2016-09-01 Thread Steve McLeod
I tried adding the H2 tests to Travis, but this turned out to be not easy. The tests never complete, and after some time, Travis kills the build. I suspect it is memory-related or thread-related, but it became a big time sink. Next time I'll try with mosts tests disabled, and see if I can

Re: [h2] Re: H2 Corrupted database v1.4.189

2016-08-23 Thread Steve McLeod
> multi threaded application. > > 2016-08-20 18:12 GMT+01:00 Steve McLeod <steve@gmail.com > >: > >> You are using a version of H2 (1.4.189) that was clearly marked as beta. >> The most recent stable release is 1.3.176. >> >> In my opinion, you sho

[h2] Re: H2 Corrupted database v1.4.189

2016-08-20 Thread Steve McLeod
You are using a version of H2 (1.4.189) that was clearly marked as beta. The most recent stable release is 1.3.176. In my opinion, you should be using 1.3.176 for production. If you really insist on using the latest beta, then you should use the page store, and not the MV store. Do this by

Re: [h2] Shall I add H2 to Travis CI?

2016-08-15 Thread Steve McLeod
Great! Starting from 14 August 2016, you'll see a green checkmark next to each commit on https://github.com/h2database/h2database/commits/master if the build passed. If it failed you'll see a red cross. Click on the checkmark/cross and you'll see more info about the build on travis-ci.org

Re: [h2] Shall I add H2 to Travis CI?

2016-08-13 Thread Steve McLeod
PS: You can see Travis CI in action with my fork of H2database here: https://travis-ci.org/stevemcleod/h2database On Saturday, 13 August 2016 15:44:28 UTC+2, Steve McLeod wrote: > > Done! Sort of. It's working with my own fork of H2. > > Thomas, I think you (or another memb

Re: [h2] Shall I add H2 to Travis CI?

2016-08-13 Thread Steve McLeod
.v...@gmail.com > > wrote: > >> Very good idea! I wanted to do exactly that, but never got time. It will >> be a great contribution! >> >> Sergi >> >> 2016-08-11 13:18 GMT+03:00 Steve McLeod <steve@gmail.com >> >: >> >>

Re: [h2] Potential performance improvement

2016-08-12 Thread Steve McLeod
I've carefully reasoned my approach, and tested it. I've made a pull request, and I'd be grateful for a careful check of my pull request before it gets merged. On Friday, 12 August 2016 10:09:52 UTC+2, Steve McLeod wrote: > > I'm using the latest master from GitHub. > > Y

Re: [h2] Potential performance improvement

2016-08-12 Thread Steve McLeod
I'm using the latest master from GitHub. Your question triggered a thought in my mind. In December last year, I ensured that the CACHED_CALENDAR is cleared each time it is retrieved, to solve a particularly nasty bug affecting users of my H2-based product when in the Moscow timezone and using

[h2] Re: What is the last stable version of H2 for 1.4.x versions.

2016-08-12 Thread Steve McLeod
That is wrong information in Wikipedia. The H2 website is the authoritative source here. On Friday, 12 August 2016 04:26:00 UTC+2, lakshman udayakantha wrote: > > Hi Steve, > > Anyway I see in wikipedia https://en.wikipedia.org/wiki/H2_(DBMS) , > 1.4.191 as a stable release. > > > On

[h2] Potential performance improvement

2016-08-11 Thread Steve McLeod
I'm seeking some advice on a performance improvement. I did some profiling on a query that returns 500K rows of data. I discovered that one method in org.h2.util.DateTimeUtils uses about 25% of the elapsed time: public static long getTimeLocalWithoutDst(java.util.Date d) {

[h2] Shall I add H2 to Travis CI?

2016-08-11 Thread Steve McLeod
Travis CI is web-based continuous integration that works well with GitHub and is free for open source. I propose adding H2 to Travis. This will make it clear almost immediately after a commit to master that the build is broken. I think it can also do the same to pull requests, before they get

[h2] Re: load entire database in memory

2016-08-11 Thread Steve McLeod
This is the wrong list for your question. Ask on stackoverflow.com or a general database design forum. On Saturday, 6 August 2016 17:03:58 UTC+2, vicenrico wrote: > > Hello. I have a question. > I'm developing a program and I would like how to improve my db scheme > desing. > Currently I'm

[h2] Re: What is the last stable version of H2 for 1.4.x versions.

2016-08-11 Thread Steve McLeod
The website info is accurate. The latest stable is 1.3.176. There has not yet been a 1.4.x version marked as stable. I think it is likely that the next 1.4.x update will be marked as stable. On Thursday, 11 August 2016 08:06:03 UTC+2, lakshman udayakantha wrote: > > Hi, > > H2Database site says

[h2] Re: The DB size increases from 100 MB to 1GB

2016-07-29 Thread Steve McLeod
> I'm using 1.4.161 Do you mean 1.3.161? If so, the first step would be to update to either 1.3.176 (release, stable) or 1.4.192 (beta, latest). Many bugs have been fixed since 1.3.161 On Friday, 29 July 2016 08:28:39 UTC+2, IntensiveH2 wrote: > > Hello, > > I'm using 1.4.161 in > mode >

Re: [h2] H2 Database - Connection Closes Abruptly

2016-06-30 Thread Steve McLeod
As a first step, update to the latest release H2 jar (1.3.176) or the latest beta jar (1.4.192). As a second step, try to find reliable steps to reproduce the problem. This helps fix the problem. On Friday, 24 June 2016 09:26:43 UTC+2, Ranjit K wrote: > > My question to you more

[h2] Re: H2 Database support

2016-06-30 Thread Steve McLeod
> there is no response from Steve McLeod For the record, I received an email from Aamir asking for commercial support AFTER he posted here. On Monday, 27 June 2016 14:24:19 UTC+2, Aamir Shahbaz wrote: > > I even tried to contact the "Commercial Support" listed on > htt

[h2] Re: Trigger not found - I have read every other post

2016-06-14 Thread Steve McLeod
Note that an IntelliJ IDEA data source is not running in the same JVM that your project is running in. The data source is independent of your project code, and has no awareness of it. I guess you'd have to compile your Trigger class, bundle it into a jar, and add that jar to the data source

Re: [h2] Proposal: Change the docs for how to contribute

2016-06-10 Thread Steve McLeod
gt; Regards, > Thomas > > > On Thursday, June 9, 2016, Steve McLeod <steve@gmail.com > > wrote: > >> The H2 website has guidelines for contributing patches to H2: >> http://h2database.com/html/build.html#providing_patches >> >> The guidelines include this

[h2] Re: H2 Corrupt database: Runtime Exception: rowCount expected 2593 got 2592, SQL Statement "INSERT [...]" [50000-172]

2016-06-10 Thread Steve McLeod
You should at the very least be using H2 1.3.176, the most recent stable version. I suggest doing that and seeing if you get less corruption problems. On Thursday, 9 June 2016 16:30:17 UTC+2, Paul Erdos wrote: > > Hello, > I get very often corrupted H2 databases, I'm able to recover them with

[h2] Proposal: Change the docs for how to contribute

2016-06-09 Thread Steve McLeod
The H2 website has guidelines for contributing patches to H2: http://h2database.com/html/build.html#providing_patches The guidelines include this: Submit patches as .patch files (compressed if big). To create a patch using > Eclipse, use Team / Create Patch. However, ever since H2 moved from

Re: [h2] When will stable version release?

2016-05-14 Thread Steve McLeod
t; most once every 10 seconds for example). > > Could you tell me what is the size of your database file (before and after > compaction)? > > Regards, > Thomas > > > > > > > On Wednesday, May 4, 2016, Steve McLeod <steve@gmail.com > &

Re: [h2] When will stable version release?

2016-05-04 Thread Steve McLeod
txt" and "jmap -histo >> > jmap.txt". I would use an endless loop with "sleep 1" as a shell script. > > Regards, > Thomas > > > > On Thursday, March 31, 2016, Steve McLeod <steve@gmail.com > > wrote: > >> Hi Thomas,

[h2] Re: Calling H2 stored procedure results in 'JdbcSQLException: Function alias "PROCEDURE" not found'

2016-05-02 Thread Steve McLeod
I'm pretty certain that this is an EclipseLink bug. It is generating the wrong syntax to call a stored procedure (actually a user-defined function) in H2. The syntax is CALL logProc() and not EXECUTE PROCEDURE logProc() On Sunday, 1 May 2016 19:47:02 UTC+2, Szymon Kuryło wrote: > > Table

[h2] Re: Having trouble increasing performance of a large table

2016-04-25 Thread Steve McLeod
* Do you need 3 million rows returned? Or, say, just the first 10 or 100 or 1000 rows? Then use SELECT TOP 100 at the beginning of your query. This should give you an enormous gain in query speed. * Can you somehow get rid of the OR in your where clause? The OR is going to cause H2 to scan

Re: [h2] Re: Timeout trying to lock table

2016-04-19 Thread Steve McLeod
he code that deletes rows runs as a cleanup routine during the overnight. > > This is a mystery. > > The database is corrupt after this happens. Is there some analysis I might > be able to do on my side to help figure out the source of the corruption? > > > > On Saturd

Re: [h2] Re: Timeout trying to lock table

2016-04-09 Thread Steve McLeod
I am seeing? > > - Stuart > > On Friday, April 8, 2016 at 9:08:32 AM UTC-4, Stuart Goldberg wrote: >> >> What release number is that? Because I think I'm using the latest release. >> >> Please clarify >> On Apr 8, 2016 8:09 AM, "Steve McLeod"

Re: [h2] Re: Timeout trying to lock table

2016-04-08 Thread Steve McLeod
This reminds me somewhat a bug I encountered in January. It affected what was then the latest update, and the problem affected the old PageStore. I fixed it, and the fix is in the current release of H2: https://github.com/h2database/h2database/pull/224 The appearance of the bug was the same:

Re: [h2] When will stable version release?

2016-03-31 Thread Steve McLeod
Hi Thomas, If keeping performance on par with the page store is an aim before removing the beta status, I'd say 1.4 is not ready. I did some performance tests today with my product against 1.4 with the MV Store and 1.4 with the page store. The page store is still much faster for a large

[h2] Re: To which H2 version should we update in productive environments

2016-01-09 Thread Steve McLeod
I develop a product that has extremely high use of H2, and uses the PageStore. We've tried the MVStore but still find some stability issues compared to the the PageStore. I recommend the most recent stable version of 1.3, which is 1.3.176. If you want to keep using the PageStore (which I

[h2] Re: Fix for problem affecting "Europe/Moscow" timezone

2015-12-31 Thread Steve McLeod
Hi Paul, I guess I was unclear. I believe it to be an H2 bug, not a Java bug. H2 was reusing calendar instances, sometimes without first calling the "calendar.clear()" method. By chance, this was okay with the way H2 used it, until a Java update with a revised timezone database file was

Re: [h2] Poor performance

2015-12-24 Thread Steve McLeod
James, I think query optimizer hints would really help here. Unfortunately, no one has offered to implement them yet, I think. On Wednesday, 23 December 2015 18:07:00 UTC+1, James Sheets wrote: > > Just to be clear, by "covering" I meant an index that covers the predicate > and the

[h2] Re: 1.4 extrem slow

2015-12-09 Thread Steve McLeod
You'll have more chance of help if you make a self-contained reproducible test. The test should create the table, populate the table, run the SELECT + UPDATE. Make sure to include your JDBC URL. 3 million rows shouldn't be necessary to reproduce the problem - it should become apparent with

[h2] Re: Database locked on long running DELETE query

2015-11-29 Thread Steve McLeod
My understanding is that H2 is single-threaded, unless you use MULTI_THREADED or possibly MVCC. The second query needs to wait until the first completes. This is explained in the docs here: http://www.h2database.com/html/features.html#multiple_connections On Saturday, 28 November 2015

[h2] Re: WebServlet container authentication

2015-11-12 Thread Steve McLeod
Hi Lukáš, This is a generic WebServlet+database question, and not an H2-specific question, no? You should ask this question on stackoverflow.com. In fact, you'll probably find it is already answer there. On Wednesday, 11 November 2015 09:15:02 UTC+1, Lukáš Vasek wrote: > > Hi, > Is there any

[h2] Re: What's your experience which huge databases (5M+)?

2015-10-28 Thread Steve McLeod
5M+ whats? rows? bytes? On Tuesday, 27 October 2015 10:10:04 UTC+1, Benjamin Asbach wrote: > > Hi there, > > I'm looking for some experiences which tables with a huge amount of data > (5M+). To be a little bit more concrete what I'm interested in: > > * How much data do you store (lines per

[h2] Re: Issue between version 1.4.188 and 1.4.189

2015-09-18 Thread Steve McLeod
What's the username/password for this H2 database? I ask because I did some work in the DateTimeUtils class that was merged into the latest release, and I'd like to double check with your database that my code is not at fault here. On Thursday, 17 September 2015 08:03:30 UTC+2, IntensiveH2

Re: [h2] alias in HAVING clause

2015-08-28 Thread Steve McLeod
To clarify my own post: I'd expect the SELECT to fail in both cases. On Friday, 28 August 2015 12:41:10 UTC+2, Steve McLeod wrote: I agree with Taras here - I've been bitten by the same behaviour. But this topic's title is misleading; it not because of the HAVING keyword

Re: [h2] alias in HAVING clause

2015-08-28 Thread Steve McLeod
I agree with Taras here - I've been bitten by the same behaviour. But this topic's title is misleading; it not because of the HAVING keyword and it is not because of the column alias. Fundamentally, depending on the data in the table, sometimes you can include a column in the select clause

[h2] Re: Syntax error in SQL statement SELECT ...; expected identifier

2015-08-25 Thread Steve McLeod
You'll notice that immediately after the WITH keyword, there is [*]. This indicates where the syntax error was. Without the WITH it should work as intended, no? SELECT * FROM policies JOIN (SELECT id, MAX(generationId) AS maxgen FROM policies GROUP BY id) AS mg ON policies.id =

Re: [h2] Negative zero of DOUBLE type

2015-08-21 Thread Steve McLeod
Christopher, You can use the latest H2 1.4 release with MV_STORE=false in the JDBC URL. This will, in effect, give you what could be considered an H2 1.3 database engine, but with the performance tweaks and bug fixes of the last year or so included. -- You received this message because you

Re: [h2] Re: H2 Database Engine: New version 1.4.188 available

2015-08-10 Thread Steve McLeod
Specifically, it is here: https://github.com/h2database Thanks to GitHub, you can easily fork, watch, and issue pull requests. On Monday, 10 August 2015 07:54:18 UTC+2, Noel Grandin wrote: It's on GitHub now. On Mon, 10 Aug 2015 at 02:38, Kenton Garner kenton...@gmail.com javascript:

Re: [h2] QUERY_CACHE_SIZE default value too low?

2015-08-09 Thread Steve McLeod
@rado, Thanks for the suggestion. I tried Tomcat's connection pool, and it is indeed exactly what I need. On Saturday, 8 August 2015 10:04:46 UTC+2, rado wrote: I would recommend you to try the tomcat connection pool. I think it is available as a separate distributable jar. -- You

Re: [h2] QUERY_CACHE_SIZE default value too low?

2015-08-07 Thread Steve McLeod
using a more advanced connection pool? One that re-uses prepared statements. The H2 one is really simple and prevents that. Regards, Thomas On Thursday, August 6, 2015, Steve McLeod steve.mcl...@gmail.com wrote: Noel, I think you are right. I use this pattern for each query: public

Re: [h2] QUERY_CACHE_SIZE default value too low?

2015-08-06 Thread Steve McLeod
, that the only thing left in the profile is the parser initialisation :) On Wed, 05 Aug 2015 at 16:27, Steve McLeod steve@gmail.com javascript: wrote: Hi Noel, I've actually solved this problem of PreparedStatement caching for my app by increasing QUERY_CACHE_SIZE to 100. But I'm

Re: [h2] Database created with H2 1.3 possibly incompatible with H2 1.4 due to h2.storeLocalTime?

2015-08-05 Thread Steve McLeod
this with MV_STORE=false. I'll continue posting more info as I narrow down the problem. On Tuesday, 4 August 2015 18:48:06 UTC+2, Steve McLeod wrote: Hi Thomas, The database is created with 1.3.176. The error happens in 1.4.188. I don't normally set h2.storeLocalTime - I just observed

Re: [h2] Database created with H2 1.3 possibly incompatible with H2 1.4 due to h2.storeLocalTime?

2015-08-05 Thread Steve McLeod
:36 UTC+2, Steve McLeod wrote: My latest findings: I can reproduce (again, sporadically) the problem by exclusively using h2 1.4.188 as follows: 1) set System.setProperty(h2.storeLocalTime, false), start the app, import some data; then 2) restart the app with System.setProperty(h2

Re: [h2] Database created with H2 1.3 possibly incompatible with H2 1.4 due to h2.storeLocalTime?

2015-08-05 Thread Steve McLeod
(TransactionCommand.java:49) at org.h2.command.CommandContainer.update(CommandContainer.java:78) at org.h2.command.Command.executeUpdate(Command.java:254) ... 17 more On Wednesday, 5 August 2015 13:08:37 UTC+2, Steve McLeod wrote: More info: I've been unable to reproduce this using the MVStore. I can make

Re: [h2] QUERY_CACHE_SIZE default value too low?

2015-08-05 Thread Steve McLeod
=? and tablesize=? and gametypeid=? Regards, Steve On Wednesday, 5 August 2015 14:40:28 UTC+2, Noel Grandin wrote: Is it possible you could share a couple of the queries that are taking this long? Perhaps privately with Thomas and myself? On 2015-08-05 02:34 PM, Steve McLeod wrote: I've

Re: [h2] QUERY_CACHE_SIZE default value too low?

2015-08-05 Thread Steve McLeod
Hi Noel, I've actually solved this problem of PreparedStatement caching for my app by increasing QUERY_CACHE_SIZE to 100. But I'm interested in helping solve the bigger issue of why it seems to take a comparatively significant time to create a PreparedStatement. Cheers, Steve On Wednesday,

[h2] Re: Database created with H2 1.3 possibly incompatible with H2 1.4 due to h2.storeLocalTime?

2015-08-04 Thread Steve McLeod
, but as the code is foreign to me, I could be very wrong in my analysis. On Monday, 3 August 2015 12:06:35 UTC+2, Steve McLeod wrote: It seems the problem is essentially caused by this: In H2 1.3, h2.storeLocalTime=false In H2 1.4, h2.storeLocalTime=true 1. Create a database with 1.3 that uses

Re: [h2] Database created with H2 1.3 possibly incompatible with H2 1.4 due to h2.storeLocalTime?

2015-08-04 Thread Steve McLeod
is the create_build in the database file (select * from information_schema.settings)? How do you set the system property (in which version of H2, how, and when)? It would need to be set before loading the H2 driver. Regards, Thomas On Tuesday, August 4, 2015, Steve McLeod steve

[h2] Database created with H2 1.3 possibly incompatible with H2 1.4 due to h2.storeLocalTime?

2015-08-03 Thread Steve McLeod
It seems the problem is essentially caused by this: In H2 1.3, h2.storeLocalTime=false In H2 1.4, h2.storeLocalTime=true 1. Create a database with 1.3 that uses columns of type DATETIME 2. Subsequently open it with 1.4 3. You'll get sporadic exceptions when executing SQL select statements.

Re: [h2] QUERY_CACHE_SIZE default value too low?

2015-08-03 Thread Steve McLeod
, Steve McLeod On Sunday, 2 August 2015 20:14:30 UTC+2, Thomas Mueller wrote: Hi, If you use PreparedStatement, and the re-use them, within the same connection, you should be fine, even without the query cache. The cache query cache is only for those cases where you use Statement

Re: [h2] QUERY_CACHE_SIZE default value too low?

2015-08-03 Thread Steve McLeod
Grandin wrote: On 2015-08-03 11:26 AM, Steve McLeod wrote: Consider this issue solved for me - I wanted to make sure that for the longer term a bigger query cache was contemplated. A related part of this issue is that Parser.prepareCommand(String); is costly for large SQL

[h2] QUERY_CACHE_SIZE default value too low?

2015-08-02 Thread Steve McLeod
Hi all, I was doing some application profiling today. I found that in our real-world scenario of loading a database using many different very long SQL statements, a significant amount of H2's CPU time was being spent in org.h2.command.Parser.initialise(). Further investigation revealed that

Re: [h2] index for OR clause

2015-07-30 Thread Steve McLeod
Indexing for an OR clause that references two separate columns is a difficult task. Does your use case tolerate an index on columns b and c only? When I add this index to your example code: create index IDX_TEST_4 on TEST(b,c); I get this query plan: SELECT TEST.A, TEST.A2, TEST.B,

Re: [h2] Moving from H2 1.3.176 to 1.4.187 results in sporadic ArrayIndexOutOfBoundsExceptions?

2015-05-09 Thread Steve McLeod
it is trying to read past the end of a page that is 2048 bytes long. The default page size is 4096 bytes, did you set it manually to 2048 bytes? According to the database URL it doesn't look like. Regards, Thomas On Wednesday, May 6, 2015, Steve McLeod steve@gmail.com javascript

[h2] Moving from H2 1.3.176 to 1.4.187 results in sporadic ArrayIndexOutOfBoundsExceptions?

2015-05-06 Thread Steve McLeod
to avoid this problem? Regards, Steve McLeod Founder, Poker Copilot http://www.pokercopilot.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

Re: [h2] Timeline for Next Stable Release

2015-04-27 Thread Steve McLeod
There's an underscore missing, I think. The latest H2 jar didn't like MVSTORE=false. It is MV_STORE=false On Saturday, 25 April 2015 18:59:21 UTC+8, Noel Grandin wrote: As long as you are specifying MVSTORE=false on your database URL, you are still using the stable engine. I, for example,

[h2] Re: Migrated to Github

2015-04-11 Thread Steve McLeod
Hi Thomas, This is very good news. Some questions: * Have you decided on a workflow for Git? That is, will we still submit patches via this Google Group? Or will we change to feature branches accompanied with requests to merge the branch into a 'master' branch or 'develop' branch? Or will we

Re: [h2] org.h2.util.StringUtils.toUpperEnglish can be a bottleneck

2015-02-11 Thread Steve McLeod
On Tuesday, February 10, 2015, Steve McLeod steve@gmail.com javascript: wrote: Hi Thomas and Noel, I've created a patch that caches the results of toUpperEnglish on a per JdbcResultSet basis. In my specific use case (fetching 95 columns by column name over tens of thousands of rows

Re: [h2] org.h2.util.StringUtils.toUpperEnglish can be a bottleneck

2015-02-09 Thread Steve McLeod
Hi Noel, On Monday, 9 February 2015 19:14:32 UTC+6:30, Noel Grandin wrote: Hi On 2015-02-09 02:21 PM, Steve McLeod wrote: final ResultSet resultSet = conn.prepareStatement(SELECT * FROM foobar).executeQuery(); int rowCount = 0; while (resultSet.next

Re: [h2] org.h2.util.StringUtils.toUpperEnglish can be a bottleneck

2015-02-09 Thread Steve McLeod
it is worth committing? In particular, I'm concerned that my use of HashMap may be incorrect if multiple threads are sharing the result set. Regards, Steve On Monday, 9 February 2015 22:45:12 UTC+6:30, Steve McLeod wrote: Hi Noel, On Monday, 9 February 2015 19:14:32 UTC+6:30, Noel Grandin

[h2] org.h2.util.StringUtils.toUpperEnglish can be a bottleneck

2015-02-09 Thread Steve McLeod
Hi all, I've got some H2 code that executes a query that returns possibly 100,000+ rows and 95 columns. I need to retrieve every column value by name, using JDBC. Using H2's built-in profiling tool, StringUtils.toUpperEnglish seems to be a bottleneck. It seems that

Re: [h2] ALTER TABLE ADD uses too much memory

2015-01-18 Thread Steve McLeod
the ALTER TABLE ADD ... statements run, the less chance my users experience power outage, or decide to force quit the process, etc. On Tuesday, 6 January 2015 19:11:10 UTC+8, Noel Grandin wrote: On 2015-01-06 12:50 PM, Steve McLeod wrote: When our users update to the latest version of our

[h2] ALTER TABLE ADD uses too much memory

2015-01-06 Thread Steve McLeod
When our users update to the latest version of our desktop software that uses H2, we need to add several columns to a table with many columns that may have millions of rows. Some people have been getting an OutOfMemoryException during this process. I've analysed this problem, and checked the

Re: [h2] 1.4 beta creates much bigger database file

2014-12-21 Thread Steve McLeod
the task is to make it faster. There are two ways: shrink it fully to the minimum size, and shrink it incrementally (like now) but faster. I'm working on that now. Regards, Thomas On Tue, May 6, 2014 at 11:39 AM, Steve McLeod steve@gmail.com javascript: wrote: Hi Thomas, I've

Re: [h2] Re: Off-by-one bug for auto-incremented BIGINT columns?

2014-08-30 Thread Steve McLeod
It is not your use of Long.MIN_VALUE that is a problem. It seems any negative number causes the same problem. For instance, this fails with a syntax exception: CREATE TABLE connection (id BIGINT AUTO_INCREMENT(-1, 1) PRIMARY KEY); On Saturday, 30 August 2014 08:21:54 UTC+2, Gili wrote: Noel,

Re: [h2] Re: Off-by-one bug for auto-incremented BIGINT columns?

2014-08-30 Thread Steve McLeod
It seems any negative number causes the same problem. .. CREATE TABLE connection (id BIGINT AUTO_INCREMENT(-1, 1) PRIMARY KEY) I think that's not the problem. Your statement (with -1) works for me. Indeed. My mistake. -- You received this message because you are subscribed to the

Re: [h2] 1.4 beta creates much bigger database file

2014-05-04 Thread Steve McLeod
what I can do to help. Regards, Steve On Saturday, 19 April 2014 11:44:05 UTC+2, Steve McLeod wrote: Hi Thomas, Great! Glad I could help make your superb product even better. On Friday, 18 April 2014 21:38:27 UTC+2, Thomas Mueller wrote: Hi, Thanks a lot for the database! I know what

Re: [h2] 1.4 beta creates much bigger database file

2014-04-19 Thread Steve McLeod
at 5:29 PM, Steve McLeod steve@gmail.comjavascript: wrote: Hi Thomas, I've sent a link to file privately to your email address. Regards, Steve On Friday, 18 April 2014 14:04:37 UTC+2, Thomas Mueller wrote: Hi, Hm, that didn't help much. Could you send me the (compressed

Re: [h2] 1.4 beta creates much bigger database file

2014-04-18 Thread Steve McLeod
;retention_time=1000 to the database URL, and tell us if and how much this reduced the size. Regards, Thomas On Thu, Apr 17, 2014 at 3:51 PM, Steve McLeod steve@gmail.comjavascript: wrote: Hi Thomas, I've tried my desktop app with the new MV store in 1.4.177. After loading

Re: [h2] 1.4 beta creates much bigger database file

2014-04-18 Thread Steve McLeod
of the files? Regards, Thomas On Fri, Apr 18, 2014 at 1:07 PM, Steve McLeod steve@gmail.comjavascript: wrote: Hi Thomas, Thanks for the suggestion. I tried adding ;retention_time=1000 to the URL, and this resulted in a small improvement. pokercopilot.h2.db 302,018,560 bytes

[h2] 1.4 beta creates much bigger database file

2014-04-17 Thread Steve McLeod
Hi Thomas, I've tried my desktop app with the new MV store in 1.4.177. After loading a significant amount of data, the database file is 3 times the size, compared to H2 1.3.176 Here are the file sizes, in both cases after the app has stopped: pokercopilot.h2.db 302,018,560 bytes

  1   2   3   >