[h2] H2 Database Engine: New version 2.3.232 released

2024-08-10 Thread Andrei Tokar
ew artefacts will be uploaded to maven repository shortly. Have fun, Andrei Tokar -- 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...@

[h2] Re: Issue with Java Heap Space and H2 Database

2024-07-19 Thread Andrei Tokar
Hi Mahima, You did not even mention, if you are usin in-memory or persistent database, your connection URL should be the first thing to post. Database version would be helpful too. If you suspect memory leak - H2 is just another java library, so follow standard best practices to detect JVM memor

[h2] H2 Database Engine: New version 2.3.230 released

2024-07-14 Thread Andrei Tokar
ew artefacts will be uploaded to maven repository shortly. Have fun, Andrei Tokar -- 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...@

[h2] Re: Changes to MVStore.getMetaMap() does not trigger commit()

2024-06-10 Thread Andrei Tokar
Hello Chris, Just wondering what is your reason to call MVStore.getMetaMap()? But if you do, please read it's javadoc: This data is for informational purposes only. The data is subject to change in future versions. The data in this map should not be modified (changing system data may corrupt the s

[h2] Re: what data is removed during DEFRAG

2024-06-08 Thread Andrei Tokar
Plaese see nice recent message here . I hope it will help to manage your expectations about database file size. On Monday, June 3, 2024 at 5:32:12 AM UTC-4 Rinse Lemstra wrote: > My databases (mvstore) are growing rap

Re: [h2] Re: Duplicate records when order by date?

2024-04-13 Thread Andrei Tokar
Hi Peter, IMHO, Evgenij is 100% correct. This is NOT a bug. If something (like offset pagination) is not uncommon, it does not make it the best practice. If PostgressSQL always yields some deterministic behaviour, where non-determinism is allowed by SQL standard (and common sence), it does not

Re: [h2] A single update can 10x the filesize of the database

2024-03-19 Thread Andrei Tokar
ile as small as possible but it will somehow limit the file size > and make sure the space can be reused. If you really want to keep the file > size as minimal, I guess some tuning could be performed (mainly on > autocommit parameters ?). > > One of maintainer (Andrei Tokar ?)

Re: [h2] Compact on db close does not shrink db file size

2024-03-19 Thread Andrei Tokar
Hi Ulrich, Do you remove data in one big transaction? That would cause big transaction log to be created. I also agree with Noel's suggestion to insert data in batches. As far as compaction goes, I would keep WRITE_DELAY at it's default (500), or even smaller (but positive) value. Apart from con

Re: [h2] why insert many record to in-memory database is same speed as embedded-mode

2024-01-09 Thread Andrei Tokar
Apparently, you assumption about "In-mem should be much faster" is not correct. It just makes me wonder, what exactly is the problem at hand? Is that the disk-based database is too fast? Or there is an expectation of some "ludicrous speed"

[h2] Re: Infinite looping when trigger updates same table

2024-01-04 Thread Andrei Tokar
>From what you said, it sounds like a bug, but in order for someone to look at it, you need to provide a complete self-contained (without dependencies on any third party libraries) test case. On Thursday, January 4, 2024 at 2:02:48 AM UTC-5 Gaus Lostre wrote: > I create a trigger for automating

[h2] Re: out of memory after executeBatch

2023-11-21 Thread Andrei Tokar
Hi Peter, It is really hard to tell exactly what the problem with your code is, because it is not a complete one, but in case of OOM some "irrelevant" details may be a culprit. Nevertheless, it looks like "data" is some sort of a queue, continuously populated by another thread, or just a big chu

[h2] H2 Database Engine: New version released

2023-09-16 Thread Andrei Tokar
available in Maven repository shortly. For details, see the 'Change Log' at http://www.h2database.com/html/changelog.html P.S. If you reply to this message please use a different subject. Have fun, Andrei Tokar -- You received this message because you are subscribed to the Google

[h2] Re: It is my pleasure to present some transaction-testing code...

2023-09-01 Thread Andrei Tokar
Hi Ronery Coder, I haven't had a time to look at your code yet, but any tests are very match appreciated, of course. In a meantime, here are my 2c on your report from the implementer point of view: #1,2 Absence of the phenomena at particular level does not mean that implementation is wrong, ju

[h2] Re: Version 2.2.222 still not available in the Maven repository

2023-09-01 Thread Andrei Tokar
anfred Rosenboom wrote: > Hi Andrei, > > As far as I got it, the version 2.2.222 is an important patch to version > 2.2.220, but it is still not available in the Maven repository. So please > add this version to the repository. > > Best and many thanks in advance > Manfred > >

[h2] H2 Database Engine: New version released

2023-08-23 Thread Andrei Tokar
(and only 2.2.220!). It will be available in Maven repository shortly. For details, see the 'Change Log' at http://www.h2database.com/html/changelog.html P.S. If you reply to this message please use a different subject. Have fun, Andrei Tokar -- You received this message because y

[h2] Re: 2.2.220: File corrupted in chunk 17, expected page length 4..1536, got -1711276031 [2.2.220/6]

2023-08-22 Thread Andrei Tokar
s and from CSV and > JSON a XML datasources. > Thank You very much, Stepan > > Dne úterý 22. srpna 2023 v 16:36:52 UTC+2 uživatel Andrei Tokar napsal: > >> Hi t603, >> I think I have a fix for corruption problem, but since I can not >> reproduce it myself, and

[h2] Re: 2.2.220: File corrupted in chunk 17, expected page length 4..1536, got -1711276031 [2.2.220/6]

2023-08-22 Thread Andrei Tokar
t; and confirm the fix (or not), so we can accordingly plan the patch or keep digging. If you, on the other hand, can share your test case with mangled data (if sensitive), that would be even better, especially if my fix is not good enough. -- Thank You, Andrei Tokar -- You received this m

[h2] H2 Database Engine: New version released

2023-07-04 Thread Andrei Tokar
ew artefacts will be uploaded to maven repository shortly. Have fun, Andrei Tokar -- 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+unsubsc

[h2] Re: Error reading existing databases with H2 trunk

2023-06-16 Thread Andrei Tokar
Hi Silvio, SQL dump / restore is the only supported way to transition from one version to the other. We are making our best trying to preserve compatibility with older db files, but again, it's on a "best effort" basis. Forward compatibility is totaly out of question. And that's I've been talki

Re: [h2] In-Memory H2 deleted rows not garbage collected.

2023-05-22 Thread Andrei Tokar
And to confirm that problem is still there, please run it against at least latest released version (2.1.214), or even better against current git build. I have that feeling that you just run queries with LOB in the result which causes extensive LOB cloning. Try to add ;LOB_TIMEOUT=1000 (1 sec inst

[h2] Re: Asking for help

2023-02-11 Thread Andrei Tokar
Your test will pass if last view will be defined as (please note placement of join conditions): CREATE VIEW VW_INVOICESUMMARY AS SELECT IL.INV_ID, ROUND(SUM(IL.QUANTITY * IL.RATE), 2) AS NETTOT, ROUND(SUM(IL.VATVAL), 2) AS VATTOT, ROUND(SUM(IL.QUANTITY

[h2] Re: questions about case sensitivity

2023-01-15 Thread Andrei Tokar
Hi Andy, I wonder, what are your expectations in such scenario? If you are looking for a way to shoot yourself in the foot, I am sure H2 will present multiple opportunities for that. Does it really matter if it end up with "table not found" or will select from one or the other table, at random?

[h2] Re: Using mvstore directly, is there a way to mark a map as readonly

2022-12-20 Thread Andrei Tokar
I think the answer is "no" on both points. Currently here is no API to declare particular map read-only, and there is no way to disable caching of data for particular map, since it cached at lower level. I wonder what benefits do you expect from that? On Tuesday, December 20, 2022 at 3:28:54 P

[h2] Re: Wrong Discription on Download for Distribution "1.4.202"

2022-11-02 Thread Andrei Tokar
It was already fixed in the repository, just never made it to the actual site. Uploaded now. Thanks for reporting and I am sorry about any inconvenience. On Wednesday, November 2, 2022 at 8:28:34 AM UTC-4 heiko.sa...@gmail.com wrote: > I need so open an old embeddad database in h2-format (*.h2.

[h2] Re: LOB_TIMEOUT not working

2022-08-04 Thread Andrei Tokar
Hi David, Are you sure that you are reading the latest (2.1.214) code? There is no MVStore.notifyAboutOldestVersion() anymore. Please make ALL of your testing with 2.1.214, since the area of interest was actively modified recently. Regards, Andrei On Thursday, August 4, 2022 at 11:06:53 AM UTC

[h2] Re: H2 version 2.1.210 droping public table on its own

2022-07-11 Thread Andrei Tokar
I am curious what might be the reason to try the addition of MV_Store=FALSE to your connection URL, but that option has been removed a while ago (at v. 1.4.200 ?), and MVStore is the only storage engine available in H2. On Monday, July 11, 2022 at 11:43:47 AM UTC-4 ronjos...@gmail.com wrote:

Re: [h2] Automatic COMPACT does not seem to work

2022-06-24 Thread Andrei Tokar
Yes, it makes sense now to make RETENTION_TIME=0 as a default. Use case for a positive value is that it theoretically improve your chances for recovery in case of abrupt shutdown (more history has been kept), but that's about it. This setting does not change the way how compaction works, it just

Re: [h2] Automatic COMPACT does not seem to work

2022-06-22 Thread Andrei Tokar
Documentation is outdated. At the time, garbage determination was inexact and this was used as additional safety. This is not the case since 1.4.197 or 1.4.198, premature storage release is not possible anymore. On Wednesday, June 22, 2022 at 9:17:39 AM UTC-4 Ulrich wrote: > The documentation

Re: [h2] Automatic COMPACT does not seem to work

2022-06-21 Thread Andrei Tokar
I would rather try to add RETENTION_TIME=0 On Tuesday, June 21, 2022 at 8:28:42 AM UTC-4 Ulrich wrote: > My URL parameters are: > LOCK_TIMEOUT=8640;WRITE_DELAY=1;MAX_MEMORY_ROWS=100;MAX_OPERATION_MEMORY=5000;ANALYZE_AUTO=0 > > I'll check if the compact algorithm works (better) wi

Re: [h2] Automatic COMPACT does not seem to work

2022-06-15 Thread Andrei Tokar
I wonder how your url looks like, what parameters you are using, specificaly RETENTION_TIME and WRITE_DELAY ? Are any LOBs involved? With default settings auto compaction should take place in the background. Whether or not it can keep up with the rate of updates, is a different story, but the fa

[h2] Re: Error 50000-210: org.h2.jdbc.JdbcSQLNonTransientException

2022-04-09 Thread Andrei Tokar
I wonder, if you hit this bug It was fixed in a newly released 2.1.212 On Thursday, April 7, 2022 at 7:01:21 PM UTC-4 Jake Dunn wrote: > I've been trying to resolve this issue when running an integration test > against an in-memory H2 dat

[h2] H2 Database Engine: New version released

2022-04-09 Thread Andrei Tokar
message please use a different subject. Have fun, Andrei Tokar -- 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.

[h2] Re: 2.0.206 Memory leak when AUTO_COMPACT_FILL_RATE=0 and REUSE_SPACE=false

2022-01-18 Thread Andrei Tokar
This is exactly behaviour, I would expect, if you explicitely disable any space reuse. I wonder what was the size of the database file and how it's growth correlates with heap size increase? On Sunday, January 16, 2022 at 12:55:16 PM UTC-5 lowch...@gmail.com wrote: > Hi, > > I am running H2 db

[h2] H2 Database Engine: New version 2.1.210 released

2022-01-17 Thread Andrei Tokar
Hello, A new version 2.1.210 of H2 is available at http://www.h2database.com (you may have to click 'Refresh'). For details, see the 'Change Log' at http://www.h2database.com/html/changelog.html P.S. If you reply to this message please use a different subject. Have fun, A

[h2] Re: The Parser doubles params for stored procedures in v.2.0.206

2022-01-12 Thread Andrei Tokar
This issue and possible workarounds are described here and addressed by this PR . Fix will be included in the nex H2 release. On Wednesday, January 12, 2022 at 2:05:17 PM UTC-5 Artem Bilan

[h2] H2 Database Engine: New version released

2022-01-04 Thread Andrei Tokar
ge Log' at http://www.h2database.com/html/changelog.html P.S. If you reply to this message please use a different subject. Have fun, Andrei Tokar -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop rec

[h2] Re: Create table error in 2.x, unsure how to interpret: expected "IDENTITY, BIGSERIAL, SERIAL, data type"

2022-01-04 Thread Andrei Tokar
Hi Vladimir, Please take a look at your error message again: ... amr ARRAY*[*]*, creation_ts ... Marker [*] shows where parser had choked, and something of sort "IDENTITY, BIGSERIAL, SERIAL, data type" is expected instead. At this point, it should be pretty clear that ARRAY has to be typed, and

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

2021-12-23 Thread Andrei Tokar
ectionWithNarayana.setUp(TestConnectionWithNarayana.java:91) >> >> Any thoughts? >> >> Gary >> >> On Wednesday, December 22, 2021 at 1:56:44 PM UTC-5 andrei...@gmail.com >> wrote: >> >>> Hello, >>> >>> A new version 2.0.204 of H

[h2] H2 Database Engine: New version released

2021-12-22 Thread Andrei Tokar
Hello, A new version 2.0.204 of H2 is available at http://www.h2database.com (you may have to click 'Refresh'). For details, see the 'Change Log' at http://www.h2database.com/html/changelog.html P.S. If you reply to this message please use a different subject. Have fun, A

[h2] Re: H2 2.0.202 table metadata tabletype is "BASE TABLE" instead "TABLE"

2021-11-30 Thread Andrei Tokar
Please see comments on https://github.com/h2database/h2database/issues/3213 On Tuesday, November 30, 2021 at 1:46:58 PM UTC-5 raimund...@googlemail.com wrote: > Hello, > > congratulations and many thanks for the new H2 release. > > I started to migrate some applications and found the following c

[h2] H2 Database Engine: New version released

2021-11-29 Thread Andrei Tokar
Hello, A new version of H2 is available at http://www.h2database.com (you may have to click 'Refresh'). For details, see the 'Change Log' at http://www.h2database.com/html/changelog.html P.S. If you reply to this message please use a different subject. Have fun, Thomas -- You received thi

[h2] Re: MVMAP descending order

2021-11-24 Thread Andrei Tokar
MVMap is always constructed in ascending order, although it's possible to re-define what "ascending" means. In the upcoming release, or if you build library yourself, there is a possibility to iterate MVMap in reverse order. On Wednesday, November 24, 2021 at 11:06:01 AM UTC-5 Tiago wrote: > Is

Re: [h2] Re: unique index versus primary key

2021-11-23 Thread Andrei Tokar
> CREATE TABLE FCOUNTS( > ID IDENTITY primary key , > NR VARCHAR, > NAME VARCHAR, > TYPES VARCHAR, > TAG VARCHAR, > Foreign key(types) references ftypes(types), > Foreign key(tag) references ftags(tag) > ); > > > On 11/23/21 14:51, Andrei Tokar

[h2] Re: unique index versus primary key

2021-11-23 Thread Andrei Tokar
I wonder if that's because of *create unique index ftag_idx on fintags(tag); * contains invalid table name? On Sunday, November 21, 2021 at 4:07:10 AM UTC-5 yambo wrote: > Hi, > > The following works in 1.4.200, but gives the following error in > 1.4.201 : > Any ideas ? > > Kind regards > > W

[h2] Re: compactRewriteFully safety with DB writes

2021-07-25 Thread Andrei Tokar
Hi Matt, After reading your last message, I still fail to understand what exactly "no longer works" with 1.4.200? If your concern is a heap usage increase, I would say it should never be a problem on it's own, and in this case it is kind of expected, because cache now may keep weak references f

[h2] Re: compactRewriteFully safety with DB writes

2021-07-18 Thread Andrei Tokar
Hi Matt, IMHO, the best way to compact will be off-line one - MVStoreTool.compact(), and it can take only seconds (your mileage may very, of course). If you can not afford 1 min off-line interruption, then you can try just to let it run and do it's own maintenance in the background (asuming auto

[h2] Re: compactRewriteFully safety with DB writes

2021-07-15 Thread Andrei Tokar
Hi Matt, If you are experiencing a problem, which looks and smells like a cuncurrency issue, then there is definitely a good reason to suspect a concurrency issue. 8-) The real question here is: if you care enough about those problems, why are you still on version 1.4.197. MVStore's concurrency

[h2] Re: MVStore vs H2 performance

2021-05-19 Thread Andrei Tokar
First of all it is absolutely not aples-to-apples, and the fact of using BLOB sql type just makes the water more muddy. Now, You have to realize that database commit, won't write it (do mvstore commit), unless your WRITE_DELAY=0, and H2 will slow down. If you want to somewhat mimic H2, dont iss

[h2] Re: Locking in Pagestore Engine Indices

2021-02-21 Thread Andrei Tokar
Please note, that PageStore is not in active development any more. H2 currently uses MVStore as it's default storage engine. On Sunday, February 21, 2021 at 11:35:37 AM UTC-5 thamin...@cse.mrt.ac.lk wrote: > Hi, > > We are exploring the H2 database implementation details regarding the > pagesto

[h2] Re: Concurent B+tree indexing in H2 Database

2021-02-21 Thread Andrei Tokar
Hi JS, First of all, there are two storage implementations co-exist in H2, old "PageStore" and a newer one called "MVStore". I won't speak for PageStore, since it's not in active development anymore, but it's concurrency is implemented as lock for the whole tree. BTW, both storages use B-tree,

Re: [h2] Re: Time To First Row on large ResultSet

2020-11-13 Thread Andrei Tokar
Hi Val, The reason for the execution time difference that you see between full scan of the original table (LAZY_QUERY_EXECUTION, 20min) vs. scan of the intermediate temp table (6 min), could be related to the fact that database may be very sparsely populated (as a result of inserts/updates durin

Re: [h2] MvStore cache leak

2020-10-23 Thread Andrei Tokar
I guess, you next step could be to reduce configured cache size to some reasonable number. What makes you believe that you actually need such huge cache? If you have configured MVStore cache size to be 4Gb, how can you expect usedMemory field (which is java int) to always stay positive? On Frida

[h2] Re: database(dbms) replicate sort order in ascending and descending from all data strcture for fast query?

2020-08-02 Thread Andrei Tokar
We may even implement that optimization mentioned by Evgenij, regardless of the original index order (add case of exact opposite order, to be precise), because both direct and reverse iterators are available now on the underlying B-Tree (MVMap). Existence of NULL values in the order may complic

[h2] Re: How to decrease database size?

2020-07-30 Thread Andrei Tokar
Setting RETENTION_TIME to a smaller value, or even zero, will help. Also keeping database up and let it do background housekeeping after massive changes (or do changes at slower pace) will help too, but most effective way to reduce file size to a bare minimum, as you already know is SHUTDOWN CO

[h2] Re: Does MVStore make blocking IO calls?

2020-07-25 Thread Andrei Tokar
The short answer - it depends. Majority of MVStore operations for in-memory case are non-blocking, especially if you use it in a low-contention scenario, but if you have many threads competing for doing some map updates, threads may yield, sleep or even go for lock acquisition after some failed

[h2] Re: Release Schedule

2020-05-26 Thread Andrei Tokar
Hi Mark, Unfortunately, there is no set release schedule for H2, and so far they have been happening in ad-hoc fashion, when Thomas Mueller finds a time to do so, since he is the only person. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: [h2] Joining a table with itself is an issue?!

2019-12-28 Thread Andrei Tokar
I wonder how many rows do you expect to come back. Even if you have 30 year of history in your table (an given a financial nature of your data it can't be significantly longer than that), it would give us ~ 10,000 dates, which would yield 100 rows per date on average. Under such assumption join r

Re: [h2] Joining a table with itself is an issue?!

2019-12-28 Thread Andrei Tokar
I wonder how many rows do you expect to come back. Even if you have 30 year of history in your table (an given a financial nature of your data it can't be significantly longer than that), it would give us ~ 10,000 dates, which would yield 100 rows per date on average. Under such assumption join r

[h2] Re: NPE after upgrade from H2 4.1.197 to any later version

2019-12-15 Thread Andrei Tokar
I can not reproduce it with current master branch (but easily in 1.4.200). Got to be fixed by now. -- 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+un

[h2] Re: compactRewriteFully ?

2019-12-15 Thread Andrei Tokar
The best result, if you are looking to minimize file size, would be off-line mode MVStoreTool.compact(), also available as command line utility. If you are looking for the same in on-line mode (while MVStore is still open), than MVStore.compactFile() may be used. -- You received this message be

[h2] Re: Chunk metadata too long

2019-11-13 Thread Andrei Tokar
First of all - it has nothing to do with disk space available. It is a bug in MVStore. When chunk is saved and insufficient space for chunk header is reserved at the beginning, but later when all chunk's data is written and it's time to write actual values into the header (and this is JSON-like

Re: [h2] 200 crash issue

2019-10-20 Thread Andrei Tokar
Knowing the changes that went into 1.4.200, let me disagree. I suspect that split might be exactly the culprit here, another one might be a compression. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop rece

[h2] Re: Exclusive mode behavior change from 1.4.199 to 1.4.200

2019-10-16 Thread Andrei Tokar
I won't even try to defend this one. It is a bug, and fix is here. -- 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 e

[h2] Re: Exclusive mode behavior change from 1.4.199 to 1.4.200

2019-10-16 Thread Andrei Tokar
I know, I've read and run it, but my point is - it's not the connection that set exclusive mode, because there is none, exclusive mode is not set at all. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop re

[h2] Re: Exclusive mode behavior change from 1.4.199 to 1.4.200

2019-10-16 Thread Andrei Tokar
Although it is a departure from a previous behavior, this is expected, because documentation says: Only the connection that set the exclusive mode can disable it At the point when test fails, exclusive mode is not set (or rather unset alre

Re: [h2] H2 inability to deal with interrupts

2019-07-23 Thread Andrei Tokar
Paul, You are very welcome to read the code, understand it and write a little doc page about available options and trade-offs. BTW, client-server IS a solution, which trades some performance for stability. It may be unsuitable in your situation, but you never bother to describe it either, so wh

[h2] Memory increase after Update from 1.2 to 1.4.199

2019-07-18 Thread Andrei Tokar
It has been a change of the underlying storage engine used by default. You can try MV_STORE=false to stay with old pgstore. -- 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

Re: [h2] Re: Corrupt Database Chunk Wont Recover

2019-07-16 Thread Andrei Tokar
You can get them from maven repo https://mvnrepository.com/artifact/com.h2database/h2. So you did not like whatever I've recovered? I doubt that there is any more data in this file. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscrib

[h2] Re: Corrupt Database Chunk Wont Recover

2019-07-14 Thread Andrei Tokar
Please see attached my take on that recovery (after a few hacks in source code). -- 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...@googlegr

[h2] Re: Corrupted database (again) with h2-1.4.199

2019-05-29 Thread Andrei Tokar
Hi Silvio, I just merged into master presumable fix for your issue , but I can not really verify that it works. If you can rebuild h2 from master branch again and try to open that corrupted file... -- You received this message because you ar

[h2] Re: Corrupted database (again) with h2-1.4.199

2019-05-25 Thread Andrei Tokar
Too bad 8-( I was thinking about running recovery tool under debugger to see what's going on. BTW, error from recovery is different from the one database it throwing. Recovery is saying that file was kind of illegally truncated and is too short now, while database is complaining about corrupted

[h2] Re: Corrupted database (again) with h2-1.4.199

2019-05-24 Thread Andrei Tokar
Are there any chance, you can share original corrupted file? -- 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 post to

Re: [h2] OutOfMemory when creating an Index

2019-05-22 Thread Andrei Tokar
Something does not click here: If you have "a table with millions of rows and an assumed column width of 4MB of data", then how it is possible, that "with set to 1000 the index creation still required a maximum heap of about 800M, but the OOM Error did not occur anymore" ? Your thousand rows shou

[h2] Re: Corrupted database (again) with h2-1.4.199

2019-05-19 Thread Andrei Tokar
Your stack trace indicates that database is starting, so it is not obvious that it happened "during normal production use of the system". It was shut down (possibly abruptly?) before this. It was more than enough changes, of course, between 1.4.196 and 1.4.199, and many of them are targeted at p

Re: [h2] Re: Recent drops in performance

2019-04-29 Thread andrei . tokar
Please keep in mind, that even for in-memory database, pgstore or mvstore are still very much in use. So it looks like apples-to-oranges comparison indeed. To make them comparable I would switch to pgstore use in 1.4 versions, by explicitly specifying MVSTORE=FALSE in url. -- You received this

Re: [h2] Re: Recent drops in performance

2019-04-28 Thread andrei . tokar
I wonder how your URL looks like and whether it is apples to oranges comparison, because default settings have changed between those versions, most notably default storage engine was pagestore in older versions vs mvsore in recent ones. That alone can have big performance impact. In any case,

[h2] Re: Iterating cursor of a MVMap with multithread?

2019-03-06 Thread Andrei Tokar
"MV" stands for multi-version. Once you've created Cursor, it essentially will iterate over a snapshot of the map, so any subsequent updates by other threads (or even by the same thread) will not be visible. In your example cursor will happily discover key "1009". -- You received this message

[h2] Re: Efficient way to search for a row

2019-01-27 Thread Andrei Tokar
Why can't you select MAX(ID) and no ORDER BY, instead of fetching the first row of ordered select? SELECT MAX(id) FROM TRANSAKCJA WHERE "DATA" <= '2019-01-18 00:00:00.0' -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this

Re: [h2] Errors when dumping database to SQL

2019-01-26 Thread Andrei Tokar
The issue https://github.com/h2database/h2database/issues/1691 , mensioned by Evgenij, is fixed now in master. -- You received this message becau

[h2] Re: Failed to use github newest code to open old .mv.db?

2019-01-11 Thread Andrei Tokar
Or buid H2 using jdk8, or even 7 instead of 10 -- 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 post to this group, se

[h2] cache size vs. disk size

2018-12-28 Thread Andrei Tokar
First of all, do not be surprized if your file will grow well beyond yor data size, so 500Mb should not be your guideline. As far as caching raw file data, OS will do a good job if memory is plentiful. H2 caches deserialized data pages, and it is definitely a waste try to cache all of that data,

[h2] Re: MVStore cache memory usage greatly exceeding cacheSize setting

2018-12-08 Thread Andrei Tokar
> > Hi Matthew, > when you set your "cacheSize" to 96, what makes you to believe that actual memory consumption (retained size) would be ~ 96Mb? This is an *approximate* size of the *cached data, *which has some correlation with retained size, but that's about it. In the upcoming version (l

[h2] Re: autocommit=false slower than autocommit=true??

2018-12-02 Thread Andrei Tokar
No, performance suppose to be the same, if not faster, if you batch is not big. How do you measure it? what is the version you are using, and how url is look like? Can you produce standalone use case demonstrating slowness. -- You received this message because you are subscribed to the Google G

[h2] Re: General error: "java.lang.IllegalStateException: Chunk 2408 not found [1.4.197/9]"

2018-08-28 Thread Andrei Tokar
Hi Ivaylo, It would be MUCH easier if you just post java code here instead. BTW, table population with auto-commit on, no batches, and embedded data instead of prepared statement is not the fastest way of doing this, so when you say "the execution times for inserting the data were similar", it r

[h2] Re: General error: "java.lang.IllegalStateException: Chunk 2408 not found [1.4.197/9]"

2018-08-23 Thread Andrei Tokar
Hi Ivaylo, I am glad to hear that “Chunk not found” bug is no longer appear with latest build. That other discussion, you have mentioned, is related to a different performance problem, and according to Noel Grandin has been addressed in latest build, as well. Going back to your claim of slow “SE

[h2] Re: General error: "java.lang.IllegalStateException: Chunk 2408 not found [1.4.197/9]"

2018-08-21 Thread Andrei Tokar
It depends what do you mean by "executing huge number of select statements". MVStore is somewhat slower than older PageStore (MV_STORE=FALSE) in a single-threaded scenario, but with latest changes (post 1.4.97) that gap is down to about 20-40%. But multi-threaded scenario is really where MVStor

[h2] Re: General error: "java.lang.IllegalStateException: Chunk 2408 not found [1.4.197/9]"

2018-08-21 Thread Andrei Tokar
Hi Ivaylo, Circumstances under which this bug will appear may vary greatly (because it is a fairly low-level problem), but I believe it is fixed after last release. If you can build H2 from the latest code, I would be very interested in your feedback about whether or not you problem is resolved

[h2] Re: deadlock in MVStore

2018-08-08 Thread Andrei Tokar
Hi Dan, MVStore code has undergone significant changes since last release (especially in locking / synchronization area), and code referred to in you stack traces is simply not there anymore. Please try to build latest version and see if problem still there. I would be very interested in any

[h2] Re: best way to get an MV store to compact?

2018-08-02 Thread Andrei Tokar
Hi Dan, I think that MVStoreTool.compact(MVStore source, MVStore target) will fit that bill perfectly. Or you can just use command line like: java -cp h2-1.4.197.jar org.h2.mvstore.MVStoreTool -compress -- You received this message because you are subscribed to the Google Groups "H2 Databa

[h2] Re: Table Not Found

2018-07-28 Thread Andrei Tokar
Make sure your current directory on JVM startup is AppDatabase. Connection is "Ok", because it probably creates a new empty database somwhere else under ./res/db/, whatever it is. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe f

[h2] Re: Unable to execute queries concurrently in H2

2018-07-06 Thread Andrei Tokar
Leave you url as is and build H2 from latest source. There are significant changes in concurrency/scalability area. -- 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

Re: [h2] MVStore and interrupts?

2018-07-02 Thread Andrei Tokar
Hi Dan, with respect to version management in MVStore, there are significant differences between 1.4.197 release and trunk, that’s why I would recommend to check out latest code. Number of versions kept in a file-based store is determined by usage. In absense of registerVersionUsage() / deregist

[h2] Re: Unknown data type: "TINYINT"

2018-03-19 Thread Andrei Tokar
Does it work for you if CREATE statement is executed directly from web console? I was not able to reproduce it. -- 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 h

Re: [h2] NPE in simple Common Table Expression

2017-10-06 Thread Andrei Tokar
I think @stumc need to take a second look at this because problem still exists in master. It seems like TableView is released prematurely and ResultSetMetaData can not be constructed. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscri

Re: [h2] ENUM data type is not nullable?

2017-09-26 Thread Andrei Tokar
Hi Nikita, Just posted a pull request to fix enum nullability issue. https://github.com/h2database/h2database/pull/615 Problem was actually not just with select, but with insert as well. Thanks for taking time to report and troubleshoot this problem! -- You received this message because you a

[h2] Re: MVStore.compactMoveChunks() problem

2017-06-25 Thread Andrei Tokar
Hi Roland, I think, your test case reveals the bug in MVStore, but it is not directly related to MVStore.compactMoveChunks(). I have created pull request to fix it, but since I am not an author of this code, I might be wrong. Let's see how it