[patch] support for modulus operator

2011-03-01 Thread Noel Grandin
chose. A quick google search didn't turn up anything close enough, so I picked an available number. Regards, Noel Grandin PS. The roadmap web page seems to be a bit out of date - could you please remove the items you've already implemented? -- You received this message because you are subscribed

Re: h2database and java application, persistent or temporary connection

2011-03-01 Thread Noel Grandin
It's better to either hold the connection open, or get connections from a pool, but always keep one connection open. This is because it takes time to open the database file, and load bits of data into memory. -- Noel. jav pro wrote: Hi, maybe a simple question.I create an java application

[patch] alter table add column if not exists

2011-03-03 Thread Noel Grandin
Hi I wrote the code, it's mine, and I'm contributing it to H2 for distribution multiple-licensed under the H2 License,version 1.0, and under the Eclipse Public License, version 1.0 (http://h2database.com/html/license.html). Regards, Noel Grandin. -- You received this message because you

Re: Error adding constraint

2011-03-03 Thread Noel Grandin
Your syntax is wrong. You should be using CREATE INDEX FKC31EB476EDC30C54 ON XXX (YYY_ID) ALTER TABLE XXX ADD CONSTRAINT FKC31EB476EDC30C54 FOREIGN KEY (YYY_ID) REFERENCES YYY(ID) You can't do both in one statement. emek wrote: I believe this has been mentioned before, I was wondering if we

[patch] add hyperbolic math functions

2011-03-04 Thread Noel Grandin
Hi I wrote the code, it's mine, and I'm contributing it to H2 for distribution multiple-licensed under the H2 License,version 1.0, and under the Eclipse Public License, version 1.0 (http://h2database.com/html/license.html). Regards, Noel Grandin. -- You received this message because you

[patch] delete top

2011-03-04 Thread Noel Grandin
Hi I wrote the code, it's mine, and I'm contributing it to H2 for distribution multiple-licensed under the H2 License,version 1.0, and under the Eclipse Public License, version 1.0 (http://h2database.com/html/license.html). Regards, Noel Grandin. -- You received this message because you

[RFC] histogram patch V1

2011-03-11 Thread Noel Grandin
- in particular I don't know how to make the histogram values that I've added in the Column class get persisted to disk. Regards, Noel Grandin. -- You received this message because you are subscribed to the Google Groups H2 Database group. To post to this group, send email to h2-database@googlegroups.com

[RFC] histogram patch V2

2011-03-14 Thread Noel Grandin
to reduce the amount of IO Regards, Noel Grandin -- You received this message because you are subscribed to the Google Groups H2 Database group. To post to this group, send email to h2-database@googlegroups.com. To unsubscribe from this group, send email to h2-database+unsubscr

Re: EclipseLink + H2: starts multiple connections

2011-03-17 Thread Noel Grandin
That smells like a DNS configuration problem, because DNS timeouts are on the order of 2-3 seconds. Could also be a problem with the certificate chain referencing hosts that are no longer available. Cedric wrote: Thanks for the answer, it was very helpfull! The time it takes to connect is

Re: [RFC] histogram patch V2

2011-03-18 Thread Noel Grandin
Hi Thomas That sounds fine, I'll wait for your commit. You might want to define the histogram aggregate as HISTOGRAM(expression, size) for flexibility. Regards, Noel. Thomas Mueller wrote: Hi, I had a look at the patch, but I would like to change a few things. Please don't commit it yet.

[patch] Re: Some issues with ARRAY types and stored procedures

2011-03-24 Thread Noel Grandin
Hi This is a patch which implements typed arrays in function results. It removes the feature where elements of function array results are converted to columns. Regards, Noel. Lukas Eder wrote: As for me issue 3 is definitely a bug. But this happens because CALL statement translates elements

Re: Weeks of work gone ...

2011-04-07 Thread Noel Grandin
The log file from the server as it starts up would be useful. Vinicius Carvalho wrote: Hi there! I was using H2 as our test db. Our DB had around 700mb. Today we loaded it with more data (going to 2GB). After shuting down the server (embedded inside a spring config). It won't start

Re: Forming a Six-Week Contribution Plan

2011-04-11 Thread Noel Grandin
I think you need to read the JDBC documentation. Specifically, the tutorial around how to use PreparedStatement. http://download.oracle.com/javase/tutorial/jdbc/basics/prepared.html tuc70899 wrote: Hello, I am setting up a CLOB and wanted to measure its performance at large sizes. My

Re: H2 database throwing null pointer exception

2011-04-11 Thread Noel Grandin
The exception is coming from inside your format method. Look at line 15 of your Format class. phani wrote: Hi, I am new to H2 database, I ran into a particular problem where I was running a function named format. public static String format(Double sumValue,Integer decimalValue){

Re: CSVRead Performance

2011-04-12 Thread Noel Grandin
NetBeans has a nice user-friendly profiler built into it (and it's free). Thomas Mueller wrote: Hi, I don't know how to further improve performance, but I would do profiling to find out where the bottleneck is (see the performance documentation). Regards, Thomas Am 12.04.2011 08:37

Re: saving XML in H2

2011-04-13 Thread Noel Grandin
CLOB is probably a better bet. http://www.h2database.com/html/datatypes.html#clob_type raj wrote: Hi, How can I save a xml into a column. Do I need to do this in BLOB or CLOB or there is another datatype available for this. How would I retrieve the data? Please suggest. thanks.

Re: Phrase query with H2 lucene

2011-04-14 Thread Noel Grandin
It looks like Lucene needs quotes in order to trigger phrase matching. So your query needs to look like: SELECT U.ID AS ID FROM FTL_SEARCH_DATA('\new york\', 0, 0) FT, STATE U WHERE FT.TABLE='STATE' AND U.ID=FT.KEYS[0] Sneha Shenoy wrote: Hi Thomas, I checked the lucene documentation and I

Re: CSVRead Performance

2011-04-15 Thread Noel Grandin
Hi Also have a look at the class org.h2.tools.Csv in the method initRead() and modify the line in = new BufferedInputStream(in, Constants.IO_BUFFER_SIZE); to read in = new BufferedInputStream(in, 1 * 1024 * 1024); // 1 MB And let us know how it goes. I have

Re: Integrity of embedded database with 1 writer, N readers

2011-04-19 Thread Noel Grandin
That sounds dodgy - the process seeing the read-only file is going to get its in-memory structures out of sync with the on-disk data. You should probably explore architectures where the update-process makes some kind of API available so that the monitor process can periodically issue a query.

Re: Java Level Deadlock encountered...

2011-04-19 Thread Noel Grandin
Annotating the stack trace reveals this: Command#executeQuery which takes a lock on a Database object JdbcPreparedStatement#executeQuery takes a lock on a Session object LobStorage.LobInputStream#fillBuffer LobStorage.LobInputStream#readFully LobStorage.LobInputStream#read IOUtils#copy

Re: Integrity of embedded database with 1 writer, N readers

2011-04-20 Thread Noel Grandin
am, Noel Grandin noelgran...@gmail.com wrote: That sounds dodgy - the process seeing the read-only file is going to get its in-memory structures out of sync with the on-disk data. You should probably explore architectures where the update-process makes some kind of API available so

Re: Why isn't it possible to AUTO_SERVER an in-memory database

2011-04-29 Thread Noel Grandin
The docs aren't clear about this use-case, I think we'll need to wait for Thomas to weigh in. See here: http://www.h2database.com/html/features.html#in_memory_databases This seems to indicate that the first process should start the in-memory database using a URL like this jdbc:h2:mem:db1 And

Re: Why isn't it possible to AUTO_SERVER an in-memory database

2011-04-29 Thread Noel Grandin
Thomas, I checked the documentation and I can't find a place where we explain that. I can see how to start a TCP server that uses a disk-based database, but I can't see how to start a TCP server that uses a memory database. -- Noel. Thomas Mueller wrote: Hi, Currently, the auto-server mode

Re: join on csv files..

2011-05-04 Thread Noel Grandin
You're much better off copying the data into temporary tables before doing a join. CVSREAD is only intended to be used for importing data, it's not fast when doing a join. Dsp Dsp wrote: select * from csvread('secfile) b inner join csvread('firstfile.csv') a on a.col1=b.col1 order by a.col1

Re: H2 1.2 in normal SQL. An error in H2 1.3

2011-05-12 Thread Noel Grandin
what error message are you getting? HK wrote: Hello, I was using the h2 1.2, an update to 1.3. 1.2 worked fine in SQL there. But an error in 1.3. create table TEST_GROUP_CLASS ( GCL_SID1integer not null, GCL_SID2integer not null,

Re: Max number of connections for pooling

2011-05-12 Thread Noel Grandin
Each connection will take up a certain amount of memory, but memory is cheap these days. If you are using a connection pool inside your application to connect to the server, then setting the number of connections to anything above (2 * no_cores on server) is probably going to be

Re: H2 1.2 in normal SQL. An error in H2 1.3

2011-05-12 Thread Noel Grandin
.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java: 241) at H2_13Test.main(H2_13Test.java:25) On 5月12日, 午後5:30, Noel Grandin noelgran...@gmail.com wrote: what error message are you getting? HK wrote: Hello, I was using the h2 1.2, an update to 1.3. 1.2 worked fine in SQL

Re: Read-only error during SELECT

2011-05-18 Thread Noel Grandin
The DISTINCT operation needs to allocate a temporary table, which it can't do if the database is read-only. On Tue, May 17, 2011 at 14:03, Valentin Tablan v.tab...@gmail.com wrote: Here's an example of a full stack trace when this occurs: Caused by: org.h2.jdbc.JdbcSQLException: The database is

Re: 'Unexpected code path' exception on the 2nd connection to the database with fulltext search index

2011-05-23 Thread Noel Grandin
disconnecting after the first script, the exception doesn't occur... Files: [1] http://users.ninthfloor.org/~mnicky/test/1-init-db.log [2] http://users.ninthfloor.org/~mnicky/test/2-insert-rows.log On May 21, 6:40 pm, Noel Grandin noelgran...@gmail.com wrote: Do you have a test case? i.e

Re: prepared statement - parameters with subqueries

2011-05-30 Thread Noel Grandin
questions marks inside quotes are not treated as parameters. You would need to do: WHERE U.USER_NAME LIKE CONCAT('%', ?, '%') new to h2 wrote: Hi, I am a new user of H2 database and recently met the following problem. Maybe someone have any idea what's wrong? stm =

Re: Read-only error during SELECT

2011-05-31 Thread Noel Grandin
are persisted to disk already for read-only databases; it doesn't seem fundamentally different to do an external sort and distinct that way? On May 18, 11:34 am, Noel Grandin noelgran...@gmail.com wrote: The DISTINCT operation needs to allocate a temporary table, which it can't do

Re: Asynchronous Driver

2011-06-01 Thread Noel Grandin
the feeling that the underlying programming languages are at fault since we assume serial code execution by default whereas some languages (most notably VHDL from the hardware world) assume parallel execution by default and are geared towards it. Gili On 01/06/2011 3:47 AM, Noel Grandin wrote

Re: Working H2 DB with low memory (File DB vs In Memory DB)

2011-06-06 Thread Noel Grandin
Importing help is here: http://www.h2database.com/html/performance.html#fast_import vsaji wrote: Hi, I am trying implement a solution using H2 DB where it is expected to load more than 6 to 7 Million records into the DB. I am able to load this volume using mem and file option ie.

Re: Working H2 DB with low memory (File DB vs In Memory DB)

2011-06-10 Thread Noel Grandin
Java will typically consume as much memory as there is available on the system. If you want it reduce it's memory usage, then you need to explicitly tell it to limit itself. For example java -XMx=250M will tell java to limit itself to less then 250M. vsaji wrote: Hi Noel, I tried your

Re: Working H2 DB with low memory (File DB vs In Memory DB)

2011-06-10 Thread Noel Grandin
That shouldn't be the case when in file mode, the loading process should not require much memory at all. Do you have a simplified test case? vsaji wrote: Hi Noel, The issue I am trying to explain here is, even 1GB Max heap is failing when I try to load 1Million Record. So is this is an

Re: Working H2 DB with low memory (File DB vs In Memory DB)

2011-06-10 Thread Noel Grandin
Are you sure the problem is H2? Maybe try using the NetBeans memory profiler Or the Eclipse Memory Profilter (both free) to find out where the memory is going. -- Noel. vsaji wrote: Hi Noel, The issue I am trying to explain here is, the loading process is failing even on 1GB heap size.

Re: Invoking CREATE TRIGGER without the actual class file

2011-06-16 Thread Noel Grandin
Its open-source, you're welcome to checkout a copy of H2 and patch it. And then post it here, and if it integrates well enough, Thomas may accept it. On Thu, Jun 16, 2011 at 21:41, cowwoc cow...@bbs.darktech.org wrote: On 16/06/2011 2:47 PM, Thomas Mueller wrote: Hi, I'd like to know if

Re: Speed of ALTER TABLE ADD COLUMN

2011-07-04 Thread Noel Grandin
In that case you might want to consider a more full-featured database like PostgreSQL which is designed for uptime and multi-user availability. H2 is an embedded database, it's not really in the same design space. kensystem wrote: Hi Thomas, Yes both those reasons: the database (table) is

Re: H2 and Apache Zookeeper

2011-07-04 Thread Noel Grandin
Not really worthwhile in an embedded database. If you want clustered DB storage in a SQL database, you're better off looking at the recent advances in the PostgreSQL project's clustering extensions. 耍bhi wrote: Hi, Is there any way to integrate H2 with Apache Zookeeper (http://

Re: java.lang.IllegalArgumentException: nanos 999999999 or 0

2011-07-20 Thread Noel Grandin
Surely H2 should copy any mutable data-structures coming from the user at first opportunity? I'm happy to make sure a change, if you agree Thomas. -- Noel. Thomas Mueller wrote: Hi, This is strange. The checksum of the btree index page is correct, meaning it doesn't look like a corruption

Re: Roadmap: Support native XML data type

2011-07-20 Thread Noel Grandin
There is a spec here: http://en.wikipedia.org/wiki/SQL/XML I imagine it would take the form of implementing a bunch of new SQL functions and mapping a couple of new datatypes to an internal LOB representation. -- Noel anh wrote: Hi, I browsed through the roadmap and found this interesting

Re: java.lang.IllegalArgumentException: nanos 999999999 or 0

2011-07-21 Thread Noel Grandin
Hi That doesn't make any sense - we convert java.sql.Timestamp to a ValueTimestamp object internally, and convert back when the user requests a value, so there is no way they could corrupt the data by writing to a Timestamp object. -- Noel. Thomas Mueller wrote: Hi, This is strange. The

Re: Can't start h2 database on command line - ?ports in use?

2011-07-21 Thread Noel Grandin
for netstat in post above) Nothing is running on the required ports. On Jul 21, 12:27 pm, Noel Grandin noelgran...@gmail.com wrote: Do a netstat to find out what else is running on those ports. Stewart wrote: Hi Guys, Hoping you can help me. I am pretty sure that ports 8082, 9092 and 5435

Re: INSERT+SELECT fail if used in one transaction on a heavy loaded cluster

2011-07-25 Thread Noel Grandin
Sounds like auto-increment keys require a global lock in the case of a clustered DB. On Mon, Jul 25, 2011 at 21:12, Thomas Mueller thomas.tom.muel...@gmail.comwrote: Hi, I think I understand what the problem is. This is what should happen: (1) conn1: insert into database A = sequence 1

Re: Security and Audit Logging Functionality

2011-08-04 Thread Noel Grandin
That sounds like you need (1) a tool for analysing the commit log. (2) Some kind of API for events that aren't in the commit log, where you can plug in a class that implements the API and record the events. Patches welcome :-) Thotheolh wrote: Hi. After playing around with the trace log level,

Re: org.h2.jdbc.JdbcPreparedStatement.setTimestamp() not handling utc dates correctly?

2011-08-17 Thread Noel Grandin
I don't know what is wrong, but this is a test-case that shows the problem, to be used in the TestDateStorage class private void testXXX() throws SQLException { Connection conn = getConnection(date); TimeZone defaultTimeZone = TimeZone.getDefault(); Statement stat =

Re: Invalid SQL result

2011-08-20 Thread Noel Grandin
On Sat, Aug 20, 2011 at 13:21, Nitin nitin.c.chau...@gmail.com wrote: I do not have time really to setup and test this in another DBs Then why should we take the time to identify the problem? It's not like we're being paid for this. -- You received this message because you are subscribed to

Re: Hibernate and H2 failure to create tables

2011-08-25 Thread Noel Grandin
Sounds to me that somehow the H2 database is being closed between the calls. Because it's an in-memory database, that means that it'll get wiped clean. You possibly need to open a connection in the beginning and hold it open somehow so the database doesn't go away. On Thu, Aug 25, 2011 at

Re: Blob threadpool

2011-08-29 Thread Noel Grandin
With a BLOB that small, you'd be better off using a larger PAGE_SIZE, and a VARBINARY column. Mark Addleman wrote: I'm writing an application which may write tens of thousands of blobs simultaneously. Each blob will be around 1k. In initial testing, it appears that H2 writes each blob

compressed tables?

2011-08-30 Thread Noel Grandin
through PageDataIndex and PageStore is all highly inter-related. Any suggestions? Thanks, Noel Grandin -- You received this message because you are subscribed to the Google Groups H2 Database group. To post to this group, send email to h2-database@googlegroups.com. To unsubscribe from this group

Re: compressed tables?

2011-08-31 Thread Noel Grandin
to how BigTable and Hadoop store their data. Regards, Noel Grandin Thomas Mueller wrote: Hi, Numbers are already compressed (see Data.writeVarInt and so on). Regards, Thomas On Tue, Aug 30, 2011 at 6:21 PM, Noel Grandin noelgran...@gmail.com wrote: Hi I have an application where I store

Re: about database migrations framework for H2

2011-08-31 Thread Noel Grandin
I wrote my own because migrate4j didn't exist back then, but now that I look at it, my code is basically doing the same thing as migrate4j. Regards, Noel Grandin Paluee wrote: Hi there, Just wondering if anybody is using a database migrations framework like Migrate4j, or other ones with H2

Re: H2 in embedded mode in web application

2011-08-31 Thread Noel Grandin
Quite a few people do that already and it works fine. The database performs locking internally to make sure the updates are synchronized. David Marko wrote: Is it save to use H2 in embedded mode in web application? I mean if(or not) there are some potential concurrency issues when two users

Re: POSTGRESQL MODE

2011-08-31 Thread Noel Grandin
POSTGRESQL MODE modifies the syntax slightly in order to be more compatible with PostgreSQL, but 99% of the syntax stays the same. Rami Ojares wrote: Hi, I use the POSTGRESQL MODE in order to allow ODBC access to the database. Can I still use safely the H2 SQL reference or does the

Re: compressed tables?

2011-09-01 Thread Noel Grandin
Yeah, I was hoping to be able to build something that was more generally useful to the community, because I've run across this problem before. It would also be nice to be able to query the table in a normal fashion. If I was to add this feature, ideally what I want to do is to separate the

Re: Memory Leak with large inserts?

2011-09-01 Thread Noel Grandin
Try using something like Netbeans Profiler or Eclipse Memory Analyzer to see who is holding those objects in memory. Martin wrote: Hello, I generate Strings in Java, which contains SQL statements like INSERT INTO myTable VALUES (...),(...),(...),... ; This happens in Thread1 of 2 Threads

Re: Inserts become slow after a while

2011-09-09 Thread Noel Grandin
am missing completely? regards Navjot Singh On Sep 6, 5:44 pm, Noel Grandin noelgran...@gmail.com wrote: See here:http://h2database.com/html/advanced.html the discussion on durability. WRITE_DELAY sets the delay between writes being committed to disk. You could set it to longer, and you

Re: Is H2 table locking fair?

2011-09-21 Thread Noel Grandin
-locks.html#upgrade -- Noel Grandin Thomas Mueller wrote: Hi, May I ask how it's currently implemented? Wait/notify? Yes. java.util.concurrent can't be used because it doesn't support lock upgrade. Regards, Thomas -- You received this message because you are subscribed to the Google

Re: A fatal error has been detected by the Java Runtime Environment

2011-10-07 Thread Noel Grandin
Looks like you had the debugger on and the VM crashed. Sorry, but this isn't something H2 - specific. It's either a bad machine, or a bug in the Java Virtual Machine. Volvagia wrote: Current thread (0x16b63000): JavaThread JDWP Transport Listener: dt_socket daemon [_thread_in_vm, id=8412,

Re: Can SELECTIVITY be automatic using indexes?

2011-10-11 Thread Noel Grandin
Selectivity should update automatically every 1000 rows, so it should never be wrong enough to cause problems. -- Noel Grandin kensystem wrote: First I realize my question may be naive, please accept my apologies in advance. Some of the performance problems I've encountered seem to related

Re: Can SELECTIVITY be automatic using indexes?

2011-10-14 Thread Noel Grandin
Hi Ah, yes, I see what you are saying. I'm afraid on-disk b-tree indexes don't work that way. They have an entry for every row in the table, so index.size() == table.size(). -- Noel Grandin kensystem wrote: Hi Noel, thank you for your reply! Well, I was actually thinking (asking) if calling

Re: BindAddress via JDBC

2011-10-14 Thread Noel Grandin
System.setProperty(h2.bindAddress, 127.0.0.1); On 13 October 2011 21:44:41, beetle wrote: Hmm, pehaps adding it as a straight property in the config is not appropriate, so i tried adding it to the URL as such: property name=connection.urljdbc:h2:C:\journal\H2DB

Re: var/char memory usage

2011-10-25 Thread Noel Grandin
(b). As opposed to a BLOB/CLOB type, which streams only the necessary parts into memory as they are used. On Tue, Oct 25, 2011 at 16:32, Adam McMahon a...@cs.miami.edu wrote: Hi, I am new to this list.  H2 seems like a great program and I am highly considering using it in my current web app.

Re: Very slow performances on GROUP BY

2011-10-28 Thread Noel Grandin
Hi Angelo Try doing this: SELECT COUNT(HDR_EVENT_NUMBER ) AS Y, HDR_EVENT_NUMBER AS TEXT FROM PUBLIC.XDASV1 GROUP BY HDR_EVENT_NUMBER Regards, Noel. Angelo Immediata wrote: Hi Thomas I tried your suggestion; these are results: *1) explain select count(ID) as y, HDR_EVENT_NUMBER as

Re: Confused on Server#shutdownTcpServer() (Test case now attached)

2011-10-28 Thread Noel Grandin
Could you try connecting to the offending process and getting a stack dump. VisualVM should do the trick. That should tell us which thread is the problem. On Friday, October 28, 2011, Laird Nelson ljnel...@gmail.com wrote: I've added another test case to show what I mean and have attached the

Re: Confused on Server#shutdownTcpServer() (Test case now attached)

2011-10-29 Thread Noel Grandin
Hmm, I'm not entirely sure there is a bug here. It looks like the server does not have enough time to finish starting up before the shutdown command executes. The shutdown command thinks that the server is not there, so it just completes normally. I suspect that if you put Thread.sleep(500)

Re: order of SQL operations

2011-10-31 Thread Noel Grandin
see http://www.h2database.com/html/features.html#multiple_connections Adam McMahon wrote: Hi, Quick question. As I understand it, H2 handles the synchronization of SQL commands. If a number of SQL commands hit the database from a variety of connections, do they execute in the order that H2

Re: H2 DB issues

2011-10-31 Thread Noel Grandin
you'd have to provide more information, preferably a test-case. issue 3 looks like you have multiple machines accessing the same file, and those machines do not have synchronised clocks. Sri Sudha wrote: Hi, In our project we are using H2 DB version : h2-1.1.114. We are using h2db to store

Re: Issue with c3p0 when using h2-1.3.161.

2011-10-31 Thread Noel Grandin
you probably haven't specified the database URL properly. see http://www.h2database.com/html/tutorial.html#connecting_using_jdbc steve wrote: Hello Firstly , thank you for this awesome database. I've upgraded to the current release and noticed that the application wasn't functioning as

Re: Issue with c3p0 when using h2-1.3.161.

2011-10-31 Thread Noel Grandin
to the DB connection string. I must add here that using the previous  x.x.160 version works and only when I replace the jar with vx.x.161 do I run into this problem. Regards Elton Kent -Original Message- From: Noel Grandin [mailto:noelgran...@gmail.com] Sent: Monday, October 31, 2011

Re: order of SQL operations

2011-10-31 Thread Noel Grandin
of the other two will get access and perhaps lock the Database?  But which one will get access?  That is what I am trying to understand.  Will the SQL statement that was submitted first get access (is it a type of queue), or is there no guarantee on this? Thanks, -Adam On Oct 31, 1:08 am, Noel

Re: Issue with c3p0 when using h2-1.3.161.

2011-11-01 Thread Noel Grandin
- From: Noel Grandin [mailto:noelgran...@gmail.com] Sent: Monday, October 31, 2011 11:48 PM To: Elton (GMAIL); h2-database@googlegroups.com Subject: Re: Issue with c3p0 when using h2-1.3.161. Hmmm, interesting. Is there perhaps an error message earlier on in the log? I ask because I can't

Re: Statement.cancel()

2011-11-03 Thread Noel Grandin
cancel() is supported, but it does not support cancelling an in-progress single-row insert. cancel() supports stopping a long-running SELECT, UPDATE or DELETE, but only between individual rows. timbo wrote: I have a test case (below) where a long running db operation is launched in a thread,

Re: Statement.cancel()

2011-11-03 Thread Noel Grandin
that is part of a larger transaction, my thread should get an exception and I can then rollback the entire transaction, correct? Correct. On Nov 3, 4:01 am, Noel Grandin noelgran...@gmail.com wrote: cancel() is supported, but it does not support cancelling an in-progress single-row insert

Re: Slow Join request

2011-11-09 Thread Noel Grandin
Do you have indexes on these tables? On Wed, Nov 9, 2011 at 10:58, qflahaut quentin.flah...@gmail.com wrote: Hello, I'm using h2 database in my new project and i'm facing a problem on the join request. I have 2 tables: table entity and table entitystate. here is the shema of the tables :

Re: Generic CRUD web applications

2011-11-09 Thread Noel Grandin
http://stackoverflow.com/questions/414583/is-there-a-crud-generator-utility-in-javaany-framework-like-scaffolding-in-rai On Wed, Nov 9, 2011 at 09:08, cnn nagesh...@gmail.com wrote: Hello, Is there any generic CRUD web applications running on Java and H2 dataabase similar to the Evolutility

Re: Transition from Oracle to H2

2011-11-10 Thread Noel Grandin
-structured and easy to work with. Set up Eclipse, install Subclipse, checkout the repository, code, generate patch, and send to list. You're also welcome to just ask nicely for features and some of us might help out. Regards, Noel Grandin On Thu, Nov 10, 2011 at 19:39, dzoettl dzoe...@web.de

Re: Trying use SUM ??

2011-11-12 Thread Noel Grandin
your query doesn't make sense. (1) you are using a group by and a where clause that only includes one group, so the group by does nothing (2) you can't mix select * and group by On Sat, Nov 12, 2011 at 01:04, the nigga fernandopaiv...@gmail.com wrote: Hello I am trying use the SUM in a SELECT,

Re: Trying use SUM ??

2011-11-12 Thread Noel Grandin
yeah, MySQL is funny that way, it will accept some queries that aren't really legal SQL. On Sat, Nov 12, 2011 at 14:31, fernando paiva fernandopaiv...@gmail.com wrote: when I'm use mysql this is works but with h2 dont. Ok, now I understand why. thanks. 2011/11/12 Noel Grandin noelgran

Re: Is it possible to specify the port adresse when using AUTO_SERVER=TRUE?

2011-11-13 Thread Noel Grandin
Had a bash at implementing this. Let me know if it works for you. -- Noel Grandin On Sun, Nov 13, 2011 at 10:17, Thomas Mueller thomas.tom.muel...@gmail.com wrote: Hi, This isn't supported currently, but it's a reasonable request. I will not have time to implement it myself currently

Re: Migrating from MS-SQL to H2

2011-11-14 Thread Noel Grandin
google for database schema export tool and you'll find lots of free tools already out there. On Mon, Nov 14, 2011 at 20:26, Igal d...@21solutions.net wrote: hi Brian, thank you for the detailed explanation. it looks like I might be able to write a SQL script that will iterate over all the

Re: CREATE PROC equivalent

2011-11-17 Thread Noel Grandin
H2 doesn't have that kind of stored procedure, but you can easily code similar stuff in java. See here: http://h2database.com/html/features.html#user_defined_functions Igal wrote: I was trying to find some sample code for Stored Procedures or UDFs in H2. the only information I found was

Re: Performance for insertions in the memory mode

2011-11-20 Thread Noel Grandin
it in an int, we have 22 bits of range for the year, which I suspect is plenty :-) Regards, Noel Grandin. Thomas Mueller wrote: Hi, I don't know why it is slower now. According to my test, the main problem is PreparedStatement.setString. I don't see much that could be improved. Here my profiling

Re: cache size and memory esimates

2011-11-23 Thread Noel Grandin
boost in case if the cache size is not enough to keep all the data. On Nov 22, 2:52 am, Noel Grandin noelgran...@gmail.com wrote: Are you running a 32-bit VM or a 64-bit VM? With a 32-bit VM, I don't think you're going to get much more than a 2G heap on windows. Switching to a 64-bit VM

Re: Aggregate Function Class is being instantiated for each row in result set (OutOfMemoryError)

2011-11-25 Thread Noel Grandin
That's not how SQL works. H2 is correctly instantiating one instance for each group of rows. TH wrote: Good Day, I have defined a custom aggregate function class GroupConcatIntegers implementing the org.h2.api.AggregateFunction interface and registered it in my H2 database as follows

Re: Database Stability Issues

2011-11-25 Thread Noel Grandin
Both of those problems sound like one of more of the connections are not calling commit() after inserting data into the database, holding the transaction open. Jason wrote: I currently use H2 for a logging/monitoring application which runs 24x7 and I am experiencing two issues: 1) The size

Re: Database Stability Issues

2011-11-26 Thread Noel Grandin
is not the best, so perhaps some more research will turn up some conditions where a commit or rollback would be missed. On Nov 25, 3:58 am, Noel Grandin noelgran...@gmail.com wrote: Both of those problems sound like one of more of the connections are not calling commit() after inserting data

Re: cache size and memory esimates

2011-11-29 Thread Noel Grandin
You are welcome to modify the source code and try out your ideas. Instructions are here: http://h2database.com/html/build.html On Tue, Nov 29, 2011 at 12:53, andreis andrei.sobch...@gmail.com wrote: As Noel suggest, you could split the table in two: one only contains the columns that are used

Re: Infinite loop in trigger

2011-11-29 Thread Noel Grandin
Implement the Trigger interface and check the oldRow vs newRow parameters to see which fields have changed. On Tue, Nov 29, 2011 at 16:00, Christian Bauer christian.ba...@gmail.com wrote: This TriggerAdapter updates the LASTMODIFIED column of the inserted or updated row:    @Override    

Re: Database Stability Issues

2011-11-29 Thread Noel Grandin
a long startup time is also something that would happen if a connection is holding a transaction open for a long time. the trace options might help you find this: http://www.h2database.com/html/features.html#trace_options zing wrote: I'm also having trouble with long startup times - but the

Re: Infinite loop in trigger

2011-11-30 Thread Noel Grandin
, at 18:28 , Noel Grandin wrote: Implement the Trigger interface and check the oldRow vs newRow parameters to see which fields have changed. This is the workaround: public class UpdateLastModifiedTrigger extends TriggerAdapter { public static final String COLUMN_ID = ID; public static

Re: Infinite loop in trigger

2011-11-30 Thread Noel Grandin
Do you have an example of another database that implements this feature? And yes, that's not a typical use-case for a trigger (coming from someone who has been building relational database backed products 10 years). Christian Bauer wrote: On Nov 30, 2011, at 14:39 , Noel Grandin wrote: So

Re: Error 90052, Subquery is not a single column query

2011-11-30 Thread Noel Grandin
H2 does not currently support that style of IN query. You're welcome to log a feature request. Karsten Krieg wrote: Hi group! We have a working query (working on oracle that is) which throws the above SQL error in H2 v1.3.154. The query is designed to return two values from a subquery.

Re: scalability in H2 database

2011-12-05 Thread Noel Grandin
depends on the size of the row, the number of simultaneous users, the number of required read/writes per sec, etc. Viji wrote: Hi, We are trying to store about 1Million rows in H2 database tables. Can anyone please advise scalability in H2 database. Thanks. Viji -- You received this

Re: Timeout trying to lock table

2011-12-05 Thread Noel Grandin
Can you give the full stack-trace, that one is missing information. Viji wrote: Hi, We are getting Timeout trying to lock table error in the h2 database. Can anyone one please point us why it is coming ? ts=2011-12-02T03:28:09.555Z level=Excep class=gov.lbl.bdm.gsiftp.GsiFTPParallelBrowsing

Re: Workbench modeling H2 ?

2011-12-05 Thread Noel Grandin
sorry, you're better off asking on mailing lists devoted to those tools On Mon, Dec 5, 2011 at 16:01, the nigga fernandopaiv...@gmail.com wrote: Workbench/J or other GUI/Tool...I am using Power Architect, but that tool some times return few errors. On 5 dez, 06:30, Noel Grandin noelgran

Re: Connection pool in memory database (ram db)???

2011-12-06 Thread Noel Grandin
depends where the rollback occurred. If the rollback occurred after the commit, then it won't have any effect. satio wrote: Hello.. I tried using connection pool in my ram DB.. if i dont't use beginTransaction, it seems no problem. But when i use beginTransaction using connection pool in my

Re: Bug ?

2011-12-06 Thread Noel Grandin
Please post the rest of the stack trace On Tuesday, 6 December 2011, iNumerix ejeane...@gmail.com wrote: This works well in version 1.3.159 SELECT t0.id, t0.name, t0.tarification_type, t0.fixed_price, t0.price_unlicenced, t0.price_licenced, t0.periodicity, null, 0, 0 FROM usr_item t0 JOIN

Re: java.io.IOException Bad file number

2011-12-07 Thread Noel Grandin
That sounds like a reasonable suggestion to me. (not that I'm volunteering to implement it, little busy on another open-source project right now). andreis wrote: I've got that exception a couple of times. It was not related to H2. We were not able to find the reason and the solution. We

Re: Query executed in memory is taking more time than when not executed in memory

2011-12-07 Thread Noel Grandin
you are never calling commit on the connection On Wed, Dec 7, 2011 at 19:07, Vinod vinodsang...@gmail.com wrote: I would appreciate any help on this, as I am not able to make use of H2 because of this pretty basic issue. On Nov 22, 12:43 pm, Vinod vinodsang...@gmail.com wrote: I have a query

  1   2   3   4   5   6   7   8   9   10   >