Re: [h2] LOCK TABLE syntax doesn't work with H2

2024-05-09 Thread Noel Grandin
On 5/8/2024 6:31 PM, Bruce Visscher wrote: On stack overflow, Thomas Mueller  wrote: The Oracle lock table statement doesn't work in H2.  The suggested select...for update alternative

Re: [h2] Linked table issues (autocommit, prepared statement) ,modifications and licensing

2024-05-03 Thread Noel Grandin
On 5/1/2024 10:10 PM, Marat Akselrod wrote: And if it can take a long, I want to understand if I'm allowed(by license) to provide to my customers my modified version meanwhile ? Yes you are -- You received this message because you are subscribed to the Google Groups "H2 Database"

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

2024-04-16 Thread Noel Grandin
On 4/16/2024 10:19 AM, 'Peter Borissow' via H2 Database wrote: (2) The query response is inconsistent. I see 4 different responses coming back from the same query on a static table. I don't think that's right. SQL databases implement the relational model. The relational model works with

Re: [h2] Re: H2 does not use SYSTEM TABLE in table types

2024-04-10 Thread Noel Grandin
On Wed, 10 Apr 2024 at 13:01, prrvchr wrote: > > if we _did_ improve it, we would break some downstream libraries (like > JOOQ and Hibernate), who rely on the values we currently return from that > method > > Not if you only change the input handling: support the SYSTEM TABLE and > TABLE types

Re: [h2] Re: H2 does not use SYSTEM TABLE in table types

2024-04-10 Thread Noel Grandin
On Wed, 10 Apr 2024 at 11:00, prrvchr wrote: > No definitely, JDBC has nothing to do with it. It is your implementation > which by not differentiating the type of the tables, necessarily, does not > allow any filtering on the tables. Too bad and I don't think it's going > to change any time soon

Re: [h2] how much indexes are used for optimization

2024-04-07 Thread Noel Grandin
Run the EXPLAIN command to see which indexes are used for a specific query -- 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

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

2024-03-12 Thread Noel Grandin
On 3/12/2024 10:28 AM, Ulrich wrote: My database has around 50.000 tables storing several 100 millions of rows. Its a kind of time series database. Data is added continously (around 1500 rows per second) and data older than 30 days is removed once a day. I suggest (if you are not doing

Re: [h2] Syntax error with ON CONFLICT

2024-01-17 Thread Noel Grandin
On 1/18/2024 1:04 AM, 'Drew Dimanlig' via H2 Database wrote: I'm getting this error trying to execute a query that does ON CONFLICT DO UPDATE: We don't support that part of the postgres syntax. You are better off using MERGE INTO, which we do support:

Re: [h2] H2 Shell stuck wanting for response from database running mixed mode (1.4.196)

2023-11-29 Thread Noel Grandin
On Wed, 29 Nov 2023 at 17:46, Scott Huddleston < talascend.develo...@gmail.com> wrote: > I don't see any threads named "H2 TCP Server" in the application thread > dump, so your comment about the TCP server failing to start seems spot on. > Is that the correct name of the thread to look for? > >

Re: [h2] H2 Shell stuck wanting for response from database running mixed mode (1.4.196)

2023-11-28 Thread Noel Grandin
On 11/29/2023 12:42 AM, Scott Huddleston wrote: Where there other threads running when you took that thread dump? Because I dont' see the actual server thread running, which it what I would have expected. So most likely what happened is that some other program is running on the port

Re: [h2] Java junit tests fails with "object already exists" after upgrade from h2 1.4.199 to 2.2.224

2023-10-25 Thread Noel Grandin
I think it's because you are using a username of "PUBLIC", which conflicts with something we have changed (not sure what). "PUBLIC" is the name of the default schema and the default role, so it is no surprise that it conflicts. Probably we should be throwing a better error message in that

Re: [h2] Java junit tests fails with "object already exists" after upgrade from h2 1.4.199 to 2.2.224

2023-10-25 Thread Noel Grandin
My best guess right now is that you are using named in-memory databases, which means that the unit tests are sharing an in-memory database, and you are hitting a race condition (TOCTOU) in that chunk of code. Short of fixing the H2 code, the only thing I can suggest is using different

Re: [h2] Java junit tests fails with "object already exists" after upgrade from h2 1.4.199 to 2.2.224

2023-10-25 Thread Noel Grandin
On 10/24/2023 5:01 PM, Knut Skomedal wrote: Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.RuntimeException: object already exists" [5-224] Can you post the actual stacktrace of this part ? -- You received this message because you are subscribed to the

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

2023-08-29 Thread Noel Grandin
On 8/29/2023 1:33 PM, Andreas Reichel wrote: if not, would you like to accept such a basic test performance test suite? Sure, sounds like a useful tool. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and

Re: [h2] Using (+) symbol for joins H2 database in Oracle mode

2023-08-03 Thread Noel Grandin
Sorry, we do not support that syntax, even in oracle mode. -- 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

Re: [h2] Problem upgrading from h2 version 2.1.214 to 2.2.220

2023-08-03 Thread Noel Grandin
On 8/3/2023 1:10 PM, Thomas Hurley wrote: I am Product Manager for 3 products all using H2 DB and backwards compatability for updates is really an essential This is an open-source volunteer project, not a commercial offering, so no, we are not planning anything like that. You are more

Re: [h2] Problem upgrading from h2 version 2.1.214 to 2.2.220

2023-08-02 Thread Noel Grandin
You are going to need to do a dump/restore for this upgrade. Elsewhere on this group someone posted a link to a different tool that they wrote that helps with migration - that might be useful. I just normally code up some batch/shell files and run the backup and restore tools. -- You received

Re: [h2] Time statistics for explian analzy

2023-07-12 Thread Noel Grandin
On 7/11/2023 5:51 PM, CrazyDrumming wrote: One question I have is, does the time counted by explain analyze include the time it takes to convert the queried data into strings? (Strings are used to display results on the console) It does not. But that it normally a very small amount of the

Re: [h2] Atomically swap tables

2023-06-12 Thread Noel Grandin
you would need to use SET EXCLUSIVE to briefly block other operations https://h2database.com/html/commands.html#set_exclusive -- 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

Re: [h2] Problem updating from 1.4.200 to 2.1.214

2023-05-23 Thread Noel Grandin
I don't know how that code could ever have compiled. A JdbcDataSource is a supplier of java.sql.Connection objects, it is not a subclass (or a superclass) of Connection. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this

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

2023-05-21 Thread Noel Grandin
(1) That is not expected behaviour, my H2 databases grow to a point and then stabilise (and I run my H2 databases pretty hard) (2) in-memory is slightly different, we have a couple of places where we do things different because we know it's a memory database -- You received this message because

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

2023-05-21 Thread Noel Grandin
I don't have any obvious answers. You can try 2 things. First, try building H2 from git master and seeing if the changes since the last official release help. If that doesn't help, we're going to need a standalone test case (no Spring, etc) to reproduce the problem and then we might be able to

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

2023-05-20 Thread Noel Grandin
check that all your transactions are being closed. Holding a transaction open means that the storage cannot be freed. > > -- 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

Re: [h2] Need advice with embedded H2 losing data due to "revert"

2023-05-04 Thread Noel Grandin
On 5/3/2023 3:10 PM, Christian Dirks wrote: We are running a java application using embedded H2 databases and ran into data loss situation that we can not explain. It appears as if the database reverted to a previous state - or that data wasn't written to file for hours. Given the lengths

Re: [h2] How to differentiate system tables from others

2023-05-02 Thread Noel Grandin
On Tue, 2 May 2023 at 15:30, prrvchr wrote: > To be more precise: > Here is the result of some tests on the DataBaseMetadata.getTables() > method with the String[] types parameter: > types = new String[] { "BASE TABLE", "VIEW" }; Should do what you need > > -- You received this message

Re: [h2] How to differentiate system tables from others

2023-05-02 Thread Noel Grandin
Assuming you are using the normal API, it's in the TABLE_TYPE column: https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTables-java.lang.String-java.lang.String-java.lang.String-java.lang.String:A- -- You received this message because you are subscribed to the Google

Re: [h2] Request for advice

2023-04-26 Thread Noel Grandin
On 4/26/2023 11:03 AM, Silvio wrote: We have some heavy queries that involve selecting records from a base cached table A (~100K records) that satisfy a quite a number of conditions expressed as A.PK [NOT] IN (...) You could also express those as A.PK NOT IN ( SubNotCondition1 UNION

Re: [h2] H2 PreparedStatement and Arrays

2022-12-06 Thread Noel Grandin
You can do something like: final Long[] messageIds = ... final String sqlQuery = "SELECT * FROM FROM FOO WHERE FOO.MessageID IN (SELECT ID FROM TABLE(ID BIGINT=?))"; PreparedStatement ps = conn.prepareStatement(sSqlQuery); ps.setObject(1, messageIds ); -- You received this

Re: [h2] DELETE statement causes the database to multiply in size and stuck.

2022-11-21 Thread Noel Grandin
HI There probably is something wrong with our execution of that query, but I'm afraid it's too complex to be debuggable just from the overview. Unless you can prepare us a self-contained test-case, that won't be much we can do, sorry. Regards, Noel. -- You received this message because you

Re: [h2] DELETE statement causes the database to multiply in size and stuck.

2022-11-19 Thread Noel Grandin
What does EXPLAIN PLAN show? -- 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

Re: [h2] Question about JDBC prepared statements in H2

2022-11-07 Thread Noel Grandin
On 11/7/2022 4:59 PM, Silvio wrote: I was hoping for perhaps some speedup if the query planner could make a more optimal query plan based on known values in the SQL string as opposed to a more generic query plan that would have to take all possible values for one or more parameters into

Re: [h2] Question about JDBC prepared statements in H2

2022-11-07 Thread Noel Grandin
I prefer PreparedStatement purely so I can avoid thinking about escaping string values. But if that doesn't worry you, then there is no down side to using Statement for execute only once. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: [h2] Problems with linked table

2022-10-14 Thread Noel Grandin
On 10/14/2022 9:28 AM, Gerhard Duennebeil wrote: Maybe it's a bit naive, but wouldn't it be possible to store the original name beside the local name and reflect that original name back to the linked database? Oh, we wish, that would be so awesome. The case-sensitivity of identifiers in

Re: [h2] Problems with linked table

2022-10-14 Thread Noel Grandin
Firstly, let me congratulate you some very good debugging! On Fri, 14 Oct 2022 at 08:05, Gerhard Duennebeil < gerhard.duenneb...@gmail.com> wrote: > > Within the routine at line 199 a routine is called "n = > convertColumnName(n);" > > Can you debug into that convertColumnName and see which of

Re: [h2] Problems with linked table

2022-10-13 Thread Noel Grandin
Unfortunately that smells like the postgresql database driver is returning bad metadata, because it should be returning column names with the correct case from the SELECT. But you'd have to debug way down to be sure. -- You received this message because you are subscribed to the Google Groups

Re: [h2] Encountered a org.h2.jdbc.JdbcSQLException: IO Exception: null [90028-190] while accessing the database

2022-10-13 Thread Noel Grandin
You can try the recovery tool, but there are no guarantees, sometimes you get lucky, sometimes not. -- 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

Re: [h2] data conversion issues

2022-10-13 Thread Noel Grandin
That's not enough information to make a proper diagnosis, but at a guess I would say that you are trying to convert that string to a number and it won't fit into the destination type. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: [h2] Adding New Data Types in H2 Open Source Code

2022-10-12 Thread Noel Grandin
The relevant classes are called things like Value* - ValueString, ValueDecimal, etc. So you'd need to make a new subclass of Value and work from there. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop

Re: [h2] JDBC getIndexInfo for large table is very slow

2022-09-30 Thread Noel Grandin
How many tables do you have, that should return in milliseconds. You could try rinning the built in profiler (see the docs) and see what it is doing. You could also directly query the metadata table INFORMATION_SCHEMA.INDEXES -- You received this message because you are subscribed to the

Re: [h2] Management of users, roles and privileges in LibreOffice Base

2022-09-01 Thread Noel Grandin
On 2022/08/24 3:10 pm, prrvchr wrote: I just finished the admin module allowing the management of users, roles and privileges in LibreOffice Base. You are welcome to ask whatever questions you need to, and we

Re: [h2] Question about recover tool

2022-07-18 Thread Noel Grandin
On 2022/07/15 2:35 pm, Silvio wrote: Can the recover tool be manipulated to open a database in some form of "safe mode"? Or is there any other way to read a database file with the sole purpose of dumping the content of its tables? Not at the moment. The recover tool passes down a flag

Re: [h2] Exception from PgServerThread.initDb

2022-07-13 Thread Noel Grandin
You are obviously doing something rather unusual because initDb is not supposed to be called via reflection. So we're going to need a complete standalone test-case to be able to help. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: [h2] H2 knowledge

2022-07-13 Thread Noel Grandin
what documentation we have is all either at https://h2database.com/html/main.html or inside the 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

Re: [h2] Re: No SYSTEM TABLE in TABLE_TYPE column returned by DatabaseMetaData.getTables()

2022-06-23 Thread Noel Grandin
On 2022/06/23 9:30 am, prrvchr wrote: /I don't know what do you mean by system table and why you need to distinguish them from normal tables and views./ Unfortunately, we cannot change this easily because of backwards compatibility. What you can do, is to special case H2 in your JDBC

Re: [h2] Column not found when SELECTing from a recursive Common Table Expression (CTE)

2022-06-14 Thread Noel Grandin
Unfortunately CTE's in H2 are currently pretty bad, and nobody has felt sufficiently motivated to do the surgery that is necessary to accomodate them really well. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and

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

2022-06-14 Thread Noel Grandin
In general, compacting should work while the db is running, but it's fairly conservative, so if you have running queries or open transactions, that can keep a lot of stuff alive that should be compacted. Also, if you are adding stuff to the db while compacting, even if the compacter frees up a ton

Re: [h2] How to create table programming in version 2 ?

2022-06-06 Thread Noel Grandin
You're using purely internal functions, which is always going to be problematic, because then you're never sure if you have obeyed all the invariants which the code needs. Why not just call "CREATE TABLE" using the normal JDBC API? -- You received this message because you are subscribed to

Re: [h2] Properly handling large result sets

2022-04-13 Thread Noel Grandin
MAX_MEMORY_ROWS is the one you want On Wed, 13 Apr 2022 at 16:12, Ron Exxon wrote: > I have a query that returns a very large result set, which gets overflowed > to disk in a size that is too large. The environment has ample memory to > handle this result set, however I haven't been able to

Re: [h2] Value is different for AVG(CAST AS DECIMAL)

2022-04-08 Thread Noel Grandin
I think you will need to cast to something like DECIMAL(20,2) i.e. specify the precision and scale On Thu, 7 Apr 2022 at 21:49, Jane wrote: > Hi All, > > I am upgrading H2 from 1.4.197 to 2.1.210. I have a query which casts a > value to DECIMAL, as - SELECT AVG(CAST(A AS DECIMAL). Column A is

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

2022-04-08 Thread Noel Grandin
If you can provide a standalone test case, we can probably debug the issue -- 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

Re: [h2] Migration from 1.4.199 TO 2.1.210 Character Problem

2022-03-30 Thread Noel Grandin
CHAR has a default length of 1 and is a fixed length datatype. I think you want to be using VARCHAR there. -- 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

Re: [h2] H2 DB Temp File is created on separate drive

2022-02-02 Thread Noel Grandin
You'd have to modify how the java VM chooses where to put temporary files. There are various ways to do that depending on how you want to control it, but at minimum it would have to apply to that whole java process, -- You received this message because you are subscribed to the Google Groups "H2

Re: [h2] Statement.execute throws Syntax error (206/210)

2022-02-02 Thread Noel Grandin
You can specify a column as either INT or IDENTITY but not both. On Wed, 2 Feb 2022 at 20:38, Helmut Leininger wrote: > This was not the case in 200 > > Syntax error in SQL statement "create table persons (mstb_per_no int > [*]identity not null, mstb_father int, mstb_mother int, mstb_last_edit

Re: [h2] H2DB breaks GraalVM native image production

2022-01-05 Thread Noel Grandin
You're missing the the JTS geometry classes Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.locationtech.jts.geom.Geometry. To diagnose the issue you can use

Re: [h2] Re: hibernate migration an MODE=PostgreSQL

2021-12-02 Thread Noel Grandin
On 2021/12/02 9:59 am, Andrea Spacca wrote: without `MODE=PostgreSQL` and with `org.hibernate.dialect.H2Dialect` I get the following error: ``` ERROR: NULL not allowed for column "ID"; SQL statement: insert into users (id, password, session_id, username) values (null, ?, ?, ?) [23502-202]

Re: [h2] Question about live backups

2021-11-11 Thread Noel Grandin
On 2021/11/11 12:08 pm, Silvio wrote: Is there any risk in using the BACKUP command with databases being in (heavy) use? Any increased chance of database corruption? Will it dramatically slow down database  access? In theory, using the BACKUP command on a live MVStore database is

Re: [h2] In memory query optimizations

2021-10-25 Thread Noel Grandin
Trying to use H2's internals directly is not a good place to start. Rather use the JDBC API. I wouldn't bother setting any parameters initially unless you run into a problem, H2 is pretty fast out the box. -- You received this message because you are subscribed to the Google Groups "H2

Re: [h2] H2 Connection leaks in application logs

2021-08-07 Thread Noel Grandin
somewhere you are leaking connections i.e. forgetting to return them to the pool -- 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

Re: [h2] H2 Inmemory not able to load 7lc records and giving heapspace issues

2021-07-25 Thread Noel Grandin
try using nioMemFS to store the data on the native heap -- 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

Re: [h2] Autonomous commit - commit single savepoint or transaction

2021-07-25 Thread Noel Grandin
you're going to need to use two connections to achieve that -- 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

Re: [h2] CANCEL_SESSION & CREATE_INDEX

2021-06-16 Thread Noel Grandin
On 2021/06/15 6:36 pm, Tom Kalmijn wrote: I was looking for a way to cancel a long running 'CREATE INDEX'. I tried "CALL CANCEL_SESSION()" with no luck. The resultset does return True but the running create index query does not stop. There is currently no support for interrupting a CREATE

Re: [h2] Make backup relative to the current location

2021-05-14 Thread Noel Grandin
On 2021/05/13 8:07 pm, 'Christoph Läubrich' via H2 Database wrote: I'm writing an upgrade script and like to make a backup from withing that script. Is it possible to get the name of the current database location to use for something like this: DATABASE_PATH() is the function you want:

Re: [h2] Re: release date : 1.4.201 version

2021-05-13 Thread Noel Grandin
On Wed, 12 May 2021 at 19:36, Gottfried Theimer wrote: > It is great to see all the effort being put into the development of H2. It > is however not easy to see what the main work items are currently. Is the > *Roadmap* on the H2 website still the plan? What is intended for the next > release? >

Re: [h2] using external(cloud) key-value db as backing store

2021-04-27 Thread Noel Grandin
On Sat, 24 Apr 2021 at 06:52, Alex Ramos wrote: > I've come down to a decision-point with three choices... 1) reimplement > MVStore abstraction, 2) reimplement filesystem abstraction used by MVStore, > or 3) implement pluggable tables, one layer up. > > > MVStore is a "transactional key-value

Re: [h2] RFE: Enable Common Table Expression (CTE with...) in INSERT, UPDATE, DELETE, CREATE TABLE AS, CREATE VIEW AS

2021-03-11 Thread Noel Grandin
You can try the HEAD of the main git repo, but CTE's in H2 are a bit of a hack and still have a lot of issues. -- 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

Re: [h2] Re: PostgreSQL range type and functions

2021-02-18 Thread Noel Grandin
On 2021/02/19 9:27 am, Evgenij Ryazanov wrote: New data types will definitely require massive changes everywhere. Yup, that's what I meant by deep vs shallow integration. If the new datatypes are just aliases over existing types, it's not a problem. If the new datatypes want proper

Re: [h2] Re: PostgreSQL range type and functions

2021-02-18 Thread Noel Grandin
Compatibility with PostgreSQL is ok, IMO, because it's a major open-source engine. And as long as someone else is doing the work, I'm not opposed to accepting such contributions. Yeah, it's a little icky in the parsing code, but as long as it's only active in PostgreSQL compat mode, that's

Re: [h2] Re: Nested loop join implementation

2021-02-16 Thread Noel Grandin
We don't have such other join strategies so we don't need any interfaces, so we just implement the join directly in code. That code that we pointed at, is in fact the join code. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe

Re: [h2] Odd UUID to BOOLEAN conversion error

2021-01-21 Thread Noel Grandin
That smells like the kind of bug that H2 sometimes has with determining the type of a parameter in a PreparedStatement. Normally it can be worked around by using CAST around the ? so that H2 knows exactly what type to use there. Possibly we could track down the bug if you can provide a

Re: [h2] Re: Linked table fetch size

2020-12-30 Thread Noel Grandin
Sounds possible and reasonable to me. -- 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

Re: [h2] Multiple pagestore h2 instances in a single VM and memory footprint

2020-12-24 Thread Noel Grandin
It is kind of hard to tell what is going on here, because you're trying different things and causing yourself different problems in the process. If you are opening a lot of H2 databases, you may need to reduce the cache size, since each open database will have its own cache. On Wed, 23 Dec 2020

Re: [h2] Re: Fun with URIs and Windows: jdbc:h2:C:/ vs. jdbc:h2:/C:/

2020-11-24 Thread Noel Grandin
On Tue, 24 Nov 2020 at 18:37, Andreas Reichel < andr...@manticore-projects.com> wrote: > > So I wonder: should we not try to accept valid Uris at least for the > jdbc:h2:file: and jdbc:h2:nio: variants? > Would you consider PRs covering that? > > Sorry, but noo, a JDBC connection string is not

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

2020-11-10 Thread Noel Grandin
You can turn LAZY_QUERY_EXECUTION on and off using SET LAZY_QUERY_EXECUTION ON/OFF But, as I said earlier, it has restrictions - it locks internal data structures for the duration of retrieveing the resultset, so it is not great for setups that need multiple concurrent queries. -- You

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

2020-11-09 Thread Noel Grandin
> On Tuesday, November 10, 2020 at 12:03:30 AM UTC-5 val wrote: > I'm guessing this is how the h2 client/driver (not the db engine it self) behaves to handle a ResultSet. It will > fully serialize the contents of the ResultSet to disk first and then serve that. Perhaps this is

Re: [h2] Connecting Grafana to H2 Database

2020-10-30 Thread Noel Grandin
Grafana supports connecting to a postgresql database, so possibly you could make it connect to H2 using the H2 postgresql protocol support. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails

Re: [h2] MvStore cache leak

2020-10-26 Thread Noel Grandin
We should either (a) throw an exception if the cache size is so big we can't handle it (b) use BigInteger or store the cache sizes in kilobytes or megabytes to avoid overflow. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe

Re: [h2] MvStore cache leak

2020-10-23 Thread Noel Grandin
That looks like an integer overflow somewhere. I would tweak the source code in the places that modify that field, to dump stack traces, and work backwards. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop

Re: [h2] How to access the H2 parser and AST?

2020-10-07 Thread Noel Grandin
On 2020/10/07 3:54 pm, Andreas Reichel wrote: but please let me ask further: How exactly is the SQL syntax and grammar defined/specified for H2? Is there a BNF file somewhere? Or is it all hard-coded in Java only? We use a top-down recursive descent parser, and we have separate

Re: [h2] How to access the H2 parser and AST?

2020-10-07 Thread Noel Grandin
On 2020/10/07 2:37 pm, Andreas Reichel wrote: can we access the H2 internal Parse (which should know best) and retrieve the Query AST? I did not find anything in the API documentation. No, the internal parser doesn't generate a real AST, it produces something that roughly half-way

Re: [h2] Is the client-server communication protocol to the server a published API?

2020-09-23 Thread Noel Grandin
Sorry, no. We can and do change it from time to time. But if you have that level of access in your language, why not just load the H2 jar and use the JDBC API? If you cant do that, I see the option as : (*) write some kind of proxy which has a stable TCP API on one side, and talks JDBC on the

Re: [h2] H2 1.4.200: Random JRE crash

2020-09-11 Thread Noel Grandin
H2 does not use any native code at all, so if you are seeing crashes you either have a dodgy machine, or are unlucky enough to have found a bug in the Java VM. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and

Re: [h2] H2 Procedural SQL language efforts

2020-09-07 Thread Noel Grandin
I don't see the point. We have a perfectly good language already (Java), and even a built-in compiler for 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

Re: [h2] Will a H2 v1.4.200 jar file read/open a database created by H2 V1.3.x ?

2020-06-27 Thread Noel Grandin
you best bet is to do a full backup and restore. It is quite possible you have latent corruption that only newer versions will complain about. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving

Re: [h2] H2 as read-only cache, strategy for refresh

2020-06-26 Thread Noel Grandin
last line should have been "rename new table to proper name" -- 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

Re: [h2] H2 as read-only cache, strategy for refresh

2020-06-26 Thread Noel Grandin
create new table from CSV drop old table rename old table to new table -- 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

Re: [h2] upgrade from 1.4.197 to 1.4.200 broke db

2020-06-03 Thread Noel Grandin
yes, you're going to need to do a dump/restore across those versions -- 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

Re: [h2] TRANSACTIONAL option with creating/dropping tables/indexes

2020-05-30 Thread Noel Grandin
On Sat, 30 May 2020 at 03:22, Eric Faulhaber wrote: > >- As noted, CreateIndex.update() checks the transactional flag before >committing. Is this variable ever set to true, such that the commit would >be bypassed? > > It is set when creating constraints inside a table and when the

Re: [h2] Doubt about an array function [Question]

2020-05-06 Thread Noel Grandin
if you make the ALIAS DETERMINISTIC it should cache results to some extent On Wed, 6 May 2020 at 10:58, bocher wrote: > Dear all, > > I have the following sql query > > CREATE VIEW geomColumns as select t[0] as geometry_type, t[1] srid FROM > (SELECT findmetadata(COLUMN_TYPE) AS t from FROM

Re: [h2] Group BY on "large" tables from file-system causes Out of Memory Error

2020-04-21 Thread Noel Grandin
TBH, retrieving super large result sets is not something we optimise for. If you really need that, you can try turn on the LAZY_FETCH feature. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving

Re: [h2] Group BY on "large" tables from file-system causes Out of Memory Error

2020-04-21 Thread Noel Grandin
Which version is this ? And what happens when you remove the dangerous options? (LOG and UNDO_LOG) -- 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

Re: [h2] database benchmark performace mysql vs cache vs system vs directory file

2020-04-13 Thread Noel Grandin
I'm sorry to say, but you need to do more reading on how caches work, that is not at all how it functions. A brief overview of our architecture is here: http://h2database.com/html/architecture.html When people say that SQLite is faster than the filesystem, they mean it is faster for the specific

Re: [h2] database benchmark performace mysql vs cache vs system vs directory file

2020-04-12 Thread Noel Grandin
Not really, look up how an LRU cache works e.g. https://en.wikipedia.org/wiki/Cache_replacement_policies -- 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

Re: [h2] is there any clustering, replication and backup functionality?

2020-04-12 Thread Noel Grandin
No > -- 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

Re: [h2] database benchmark performace mysql vs cache vs system vs directory file

2020-04-11 Thread Noel Grandin
On Sat, 11 Apr 2020 at 21:04, Danilo Santos wrote: > exists one https://database.serverbenchmark.com/ like > https://gpu.userbenchmark.com/ or https://cpu.userbenchmark.com/ > > > Not that I am aware of. Lots of databases prohibit the publication of unauthorised

Re: [h2] does h2 support prefix index?

2020-04-10 Thread Noel Grandin
http://h2database.com/html/features.html#computed_columns On Fri, 10 Apr 2020 at 11:49, Chen Huang wrote: > I have a table with a TEXT/CLOB like column that need to be indexed: > > CREATE TABLE test (id INT PRIMARY KEY, val VARCHAR(512)) > > but this index takes too much spaces: > >

Re: [h2] Support for simulating Firebird's RelaxedAliasChecking

2020-04-08 Thread Noel Grandin
Yeah, sorry about that. If you want to work on this, the relevant code path is probably the ColumnResolver stuff. -- 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] Support for simulating Firebird's RelaxedAliasChecking

2020-04-07 Thread Noel Grandin
We don't have such a thing. You're welcome to attempt to implement it, but I think we'd be unlikely to accept such a patch because it would mean carrying ugly code in an important part of H2. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: [h2] Escaping reserved characters in database URL

2020-04-06 Thread Noel Grandin
No, we have no encoding for stuff inside a "jdbc:h2:" URL. If you really really need this, you could create a custom filesystem extension using org.h2.store.fs.FilePath and then invent your own encoding. -- You received this message because you are subscribed to the Google Groups "H2 Database"

Re: [h2] Data in application is read only after crash

2020-03-31 Thread Noel Grandin
1) I suppose it is to be done from the H2 console ? that will work, or just executing SHUTDOWN. Killing the DB process sometimes lead to corruption. 2) I have attached a log I have just received You have a corrupt DB. -- You received this message because you are subscribed to the

Re: [h2] What is the best way to store large text values?

2020-03-31 Thread Noel Grandin
If you're shutting the DB down normally, it should start up pretty quickly. H2 is unfortunately not great with TEXT/LOB data. At that size you could try storing it in a VARCHAR column. You'll have to be more specific about what exactly is slow. -- You received this message because you are

  1   2   3   4   5   6   7   8   9   10   >