Re: [h2] Don't add FK single column index if column is leading key of existing index

2015-04-16 Thread Thomas Mueller
Hi, Yes, I think there was a change in this area because of a bug, but I don't fully remember. Could you please create a simple test case that shows the problem? I mean something like: drop all objects; create table parent(id int primary key); create table child(id int primary key, parent_id int

Re: [h2] Update query performance - looking for ways to speed up

2015-04-16 Thread Thomas Mueller
Hi, The problem seems to be that you use a slow algorithm, kind of like bubble sort instead of quicksort. Your algorithm seems to take quadratic time (twice the number of rows results in four times slower performance). Why don't you use just one update? update table XYZ set a_id = userDefine

[h2] Update query performance - looking for ways to speed up

2015-04-16 Thread Pani
We have a table with 50 columns – each of these columns would have another twin column.The table therefore would have 100 columns (table is 100 column wide). For example if we have a column “A”, we have its twin column as “A_ID”. Column “A” would have a string value. Column “A_ID” would have a n

[h2] Don't add FK single column index if column is leading key of existing index

2015-04-16 Thread Wes Clark
My company, Guidewire, is attempting to move from H2 1.2 to 1.4 to take advantage of the MVStore feature that should greatly reduce deadlocks. Is it possible to change the behavior of H2 1.4 so that when a FK constraint is created it will not also create a single column index on that column if

[h2] case insensitive query with case sensitive index

2015-04-16 Thread Brian Craft
Is there any way to make use of a case sensitive index when doing a case insensitive query? I can, in fact, 'unroll' the matches if they're not very long, like select * where x = 'foo' union select * where x = 'foO' union select * where x = 'fOo' union ... which is much, much faster than doing

Re: [h2] Guthub pull requests

2015-04-16 Thread Thomas Mueller
Hi, I have merged the pull requests. > Next few months me and probably my colleagues from Apache Ignite will be contributing to H2 often That's great! By the way I'm an Apache committer as well (Apache Jackrabbit Oak). > it would be nice if pull requests will be processed faster. Unfortunately

Re: [h2] Database.allocateObjectId() performance degrades over time.

2015-04-16 Thread Thomas Mueller
Hi, Thanks a lot for your help! I have merged the pull requests. I agree the bit field should not be needed. It is currently needed mainly for the PageStore storage mechanism; I think this can be removed once we only need to support the MVStore. Regards, Thomas On Wed, Apr 15, 2015 at 11:38 AM

Re: [h2] Support to "EXTERNAL" table type

2015-04-16 Thread bocher
Hi Thomas, Merci Erwan Le jeudi 16 avril 2015 18:07:33 UTC+2, Thomas Mueller a écrit : > > Hi, > > I will push the commit shortly. > > Regards, > Thomas > > > On Wednesday, April 15, 2015, bocher > > wrote: > >> >> Hi, >> >> Please read https://github.com/h2database/h2database/pull/2. >> >> Erw

[h2] Guthub pull requests

2015-04-16 Thread Sergi Vladykin
Hi Thomas! I submitted two small pull requests on Github. Could you please review? Next few months me and probably my colleagues from Apache Ignite will be contributing to H2 often, it would be nice if pull requests will be processed faster. Of course we don't want to fork H2 but this can happ

Re: [h2] NULL Geometry index problem

2015-04-16 Thread Thomas Mueller
Hi, You are right, this is not yet working. I will committed a fix for it shortly. However I'm not sure performance is good with many null entries (I didn't test it). I think we need to implement non-covering indexes (indexes where null entries are not stored). Right now, only covering indexes are

[h2] H2 database is corrupt suddenly after a huge number of records is inserted

2015-04-16 Thread Thomas Mueller
Hi, Do you have a reproducible test case that I could run? What is the database URL? Is this an old database or a fresh one? Regards, Thomas On Thu, Apr 16, 2015 at 8:27 AM, Sourav Mandal > wrote: > Hi, > We have been using H2 databases in our production, recently due to > one activity so

[h2] jvm memory leak issue

2015-04-16 Thread Thomas Mueller
Hi, Could you tell us, what database URL and what options do you use? Which version was the database created with? Regards, Thomas On Thu, Apr 16, 2015 at 9:05 AM, Noel Grandin > wrote: > There are various possibilities: > > (1) Don't use SET LARGE_TRANSACTIONS TRUE > > (2) Very large result s

Re: [h2] Support to "EXTERNAL" table type

2015-04-16 Thread Thomas Mueller
Hi, I will push the commit shortly. Regards, Thomas On Wednesday, April 15, 2015, bocher wrote: > > Hi, > > Please read https://github.com/h2database/h2database/pull/2. > > Erwan > > > Le mardi 14 avril 2015 19:31:09 UTC+2, wener a écrit : >> >> Any explain of "EXTERNAL" table type ? Glad to

[h2] How to extract the where clause from a Select object?

2015-04-16 Thread Thomas Mueller
Hi, > I want so support SQL for a commercial product which has it own custom query syntax. OK. Please be aware that there is a potential license problem, unless one of the following applies: - the commercial product is open source, or - integrate H2 in such a way that you don't modify the source

Re: [h2] NULL Geometry index problem

2015-04-16 Thread John McMahon
I have another problem related to the NULL geometry problem. Test cases are below and tested against 1.4.187. If I add rows in a spatial table with null geometry then try to delete the rows, the second and subsequent deletes throw errors. Updates seem to be okay but below is a test for that to

[h2] Re: How to extract the where clause from a Select object?

2015-04-16 Thread Pablo Beltran
Hi Thomas again. please do not waste your time on this. I've seen that H2 ask for the data rightly, It asks for John and later for Peter data. The problem was that my plugged table is a wrapper of an underlying FunctionAlias and I took a the code code of few classes for that and therefore I in

[h2] H2 database is corrupt suddenly after a huge number of records is inserted

2015-04-16 Thread Sourav Mandal
Hi, We have been using H2 databases in our production, recently due to one activity somewhat like 80 records were inserted to a table in that. And as a result the database got corrupted. As far as we know, it is a bug in H2 database that it can get corrupted any time. So, it is just he

Re: [h2] jvm memory leak issue

2015-04-16 Thread Noel Grandin
There are various possibilities: (1) Don't use SET LARGE_TRANSACTIONS TRUE (2) Very large result sets i.e. more than 10 bytes, which you could workaround by increasing the MAX_OPERATION_MEMORY setting (3) Reading BLOBs from the database for which I don't have a workaround. Honestly, base