Re: Performance of PK queries when AND, OR or IN is used

2008-09-02 Thread Thomas Mueller
Hi, C. SELECT pk FROM t WHERE pk = ? OR pk = ? [7688ms] Nearly 8 seconds, is that right? Yes. This statement is not optimized at all, a table table scan is made. It is planned to improve that, see Optimize ID=? OR ID=?: convert to IN(...) on the roadmap. However the priority of this item is

Re: When does database Recovery occur?

2008-09-03 Thread Thomas Mueller
Hi, 13:06:49.767: Recovering C:\DataCache\h2\testDB.48.log.db 0% 13:06:53.485: Recovering C:\DataCache\h2\testDB.48.log.db 1% It looks like the transaction log file is quite large. How large are the .log.db files? The maximum size can be set using SET MAX_LOG_SIZE, see also

Re: use in hibernate and clob problem

2008-09-03 Thread Thomas Mueller
Hi, there is exception when I try to persist a CLOB field. What exception did you get? The database exception should be in the .trace.db file, but the Hibernate exception would be helpful as well. Could you post a simple test case (one table, one class with a main method) so I can reproduce

Re: When does database Recovery occur?

2008-09-04 Thread Thomas Mueller
Hi, Thank for your help! It looks like this is a bug in the transaction log file size calculation at Database.setMaxLogSize(). The log file should not be that large. I will fix this for the next release. Unfortunately, it looks like there is no workaround at the moment (except changing

Re: H2 database memory was increasing linearly

2008-09-05 Thread Thomas Mueller
Hi, What database URL do you use? How many tables and other database objects (triggers, sequences, columns,...) do you use? From the memory dump the following line is interesting: org.h2.index.TreeNode 107,219,552 bytes. The class TreeNode is used for in-memory indexes. The in-memory index is

Re: request: JdbcDataSource.setPassword(char[] password)

2008-09-08 Thread Thomas Mueller
Hi, Thank you for adding this method. It is, however, throwing an exception back at me. Strange... What database URL do you use? Regards, Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups H2 Database

Re: Concurrent update Exception ...

2008-09-12 Thread Thomas Mueller
Hi, jdbc:h2:/tmp/prod/ h2cache;TRACE_LEVEL_FILE=3;CACHE_SIZE=1048576;LOCK_MODE=3;MVCC=TRUE;MULTI_THREADED=0 This means MULTI_THREADED is disabled in your case. But I am opening and using several Sessions, concurrently, from different threads . This shouldn't be a problem. I believe, for

Re: Lucene index problem

2008-09-17 Thread Thomas Mueller
Hi, Instead of st.executeUpdate(CALL FTL_CREATE_INDEX('PUBLIC', 'test_table_li', NULL);); try st.executeUpdate(CALL FTL_CREATE_INDEX('PUBLIC', 'TEST_TABLE_LI', NULL);); Regards, Thomas --~--~-~--~~~---~--~~ You received this message because you are

Re: Location of DB

2008-09-27 Thread Thomas Mueller
Hi, You have 3 options: - You give the database enough rights to create the directory. - You create the directory before starting the application. - You use a directory where the application has enough access rights. on Windows the directory /ourb is being created Because the process has the

Re: Permission denied at temp file creation

2008-10-03 Thread Thomas Mueller
.engine.SessionRemote.createTempFile(SessionRemote.java:457) ... 8 more On Oct 1, 9:34 pm, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, I can reproduce this problem with previous versions, but so far I couldn't reproduce it with version 1.0.78. Could you post a simple test

Re: FYI: building JaQu fails with exception if H2 jar build has not been done first...

2008-10-06 Thread Thomas Mueller
:buildOK %JAVA_HOME%/bin/java -Xmx512m -cp bin;%JAVA_HOME%/lib/tools.jar;temp org.h2.build.Build %* Regards, Thomas On Sun, Oct 5, 2008 at 9:43 PM, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, I tried to build JaQu per the instructions ( which are wrong for unix/ OS X as the script is build.sh

Re: Problem with application USERS table

2008-10-08 Thread Thomas Mueller
Hi, In my application I have my own USERS table and this seems to conflict with the system USERS table. When I try to get meta data via jdbc, I get a combo of my table and the system table. resultSet = metaData.getColumns(null, , tableName, %); while (resultSet.next()) { final

Re: Multiple Connections to DB

2008-10-08 Thread Thomas Mueller
Hi, Of course you could just use the server mode. I believe there is a new connection mode that will create and manage the server for you. But I'm not sure how to do that. So I second your question: How do we allow multiple connections to embedded database? Yes there is a new (experimental)

Re: NUMBER column foreign keyed to VARCHAR2 column does not throw an error

2008-10-10 Thread Thomas Mueller
Hi, In Oracle, this will throw an error. Any chance H2 can do the same? It doesn't throw an exception in PostgreSQL. If it would throw an exception in H2, then H2 wouldn't be compatible with PostgreSQL. alter table user_ref drop CONSTRAINT ui_ur_fk; drop table user_info; drop table user_ref;

Re: group by clause does not work at the latest version 1.1.100

2008-10-10 Thread Thomas Mueller
Hi, Thanks for your mail! This is a bug in the optimization to group using an index. This feature is there since a long time, but was always disabled by default. In version 1.1 (which is still beta) it is enabled by default. You can disable this feature by setting the system property

Re: Null Pointer Exception in CREATE LINKED TABLE for MS SQL Server

2008-10-10 Thread Thomas Mueller
Hi, Thanks for the patches! I have changed it, the newest version is committed to the trunk at: http://code.google.com/p/h2database/source/browse/trunk/h2/src/main/org/h2/table/TableLink.java Regards, Thomas On Fri, Oct 10, 2008 at 7:52 PM, Pavel [EMAIL PROTECTED] wrote: After the fix I also

Re: CREATE TABLE AS SELECT FROM does not return correct update count

2008-10-10 Thread Thomas Mueller
Hi, I believe that it should return 0. The JDBC API says that executeUpdate should return: either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing Other databases also return 0. Regards, Thomas On Fri, Oct 10, 2008 at 10:30 PM, Pavel [EMAIL

Re: inefficient bit operations on used and deleted BitField

2008-10-13 Thread Thomas Mueller
Hi, Thank for your help! I will have a look how this can be improved. Maybe it makes sense to use int or byte, but I want to make sure it does in fact get faster so I will need to write some benchmarks as well. Regards, Thomas On Sat, Oct 11, 2008 at 12:00 AM, Alex [EMAIL PROTECTED] wrote:

Re: inefficient bit operations on used and deleted BitField

2008-10-14 Thread Thomas Mueller
) the file IO came up and became the slowest operation. Alex On Oct 13, 3:19 pm, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, Thank for your help! I will have a look how this can be improved. Maybe it makes sense to use int or byte, but I want to make sure it does in fact get faster so I will need

Re: Connection pool with embedded h2 - Login timeout

2008-10-14 Thread Thomas Mueller
Hi, The code synchronizes on a new object each time - that's like no synchronization at all. You probably want: synchronized (ContextInfo.class) { ... } What I'm trying to do is get a connection at the beginning of the request and return it to the pool at the end of the request. The rest of

Re: Error on connect

2008-10-15 Thread Thomas Mueller
Hi, I am sorry to say that, but it looks like a corruption problem. I am very interested in analyzing and solving this problem. Corruption problems have top priority for me. I have a few question: - Could you send the full stack trace of the exception including message text? - What is your

Re: How can i run the H2 database in server mode?

2008-10-16 Thread Thomas Mueller
Hi, SET AUTO_SERVER = mixed mode? No. 'Mixed mode' can mean two things: (A) start a server manually and then connect to it. (B) AUTO_SERVER=TRUE in which case the server is started automatically. Regards, Thomas --~--~-~--~~~---~--~~ You received this message

Re: Spanish messages translation

2008-10-16 Thread Thomas Mueller
Hi, Thanks a lot! I have now integrated the message. This will be included in the next release. Regards, Thomas On Sun, Oct 12, 2008 at 12:53 AM, Dario Fassi [EMAIL PROTECTED] wrote: Hi all, I have done a acceptable (not professional) translation of messages_en.properties to Spanish (es).

Re: NUMBER column foreign keyed to VARCHAR2 column does not throw an error

2008-10-16 Thread Thomas Mueller
Hi, insert into user_info(user_info_id) values ('9'); insert into user_info(user_info_id) values('09'); insert into user_ref(user_ref_id) values (009); The user_ref entry now points to which user_info record? For PostgreSQL, the first one ('9'). If select 'x' from dual caused postgres to

Re: H2 with multiple joins, am I doing something wrong?

2008-10-16 Thread Thomas Mueller
Hi, Could you post the data or a test case with random data? Regards, Thomas On Thu, Oct 16, 2008 at 5:01 AM, Abyric [EMAIL PROTECTED] wrote: After thouroughly reading trough many SQL optimisation sites I still fail to see what I can to to increase performance. To keep it short, my query

Re: H2 with multiple joins, am I doing something wrong?

2008-10-17 Thread Thomas Mueller
Hi, Thanks for the test case! The optimizer took most of the time, it was calculating the cost of too many query plans. I have now fixed this problem, now the query takes less than 100 ms for me (the first time is a bit slower). Regards, Thomas

Re: How can i run the H2 database in server mode?

2008-10-18 Thread Thomas Mueller
Hi, 1)Auto_server provides a new access method to embedded mode since in old embedded mode only one process could possible access the db. 2)Mixed mode means starting a server listening on a port along with a embedded mode enable, while remote access to the db is possible.Meanwhile,the

Re: temp.lob files are not always deleted

2008-10-20 Thread Thomas Mueller
Hi, Thanks for your mail! when a (b/c)lob record is deleted, the file is renamed from 1.t75.lob to 1.temp.lob, and then the file may, or may not, be deleted when the database is shutdown. Yes, the file is renamed to *.temp.db when the transaction is committed. I couldn't find any

Re: inefficient bit operations on used and deleted BitField

2008-10-20 Thread Thomas Mueller
Hi, Thanks! Your solution is faster, but I like to wait implementing it unless it is really a measurable performance problem, because the solution is quite complex :-) Maybe I will just switch to BitSet at some point. Regards, Thomas On Thu, Oct 16, 2008 at 5:25 PM, Alex [EMAIL PROTECTED]

Re: Accessing column in from clause of subselect

2008-10-20 Thread Thomas Mueller
Hi, select distinct a0.word from contexts.words a0 where (a0.word = cast('apple' as varchar)) and ((select count(a2) from (select a0.word as a2) a3) = (select 1)) order by a0.word Sorry I don't understand what the query should do. Could you explain it please? Is it the same as: select word

Re: clustered index - supported?

2008-10-21 Thread Thomas Mueller
Hi, Is a clustered index supported? It depends on what exactly you mean with clustered index... Could you explain what you need and why? Regards, Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups H2

Re: getting H2/Hibernate to recognize the Postgresql text type as Java enum

2008-10-23 Thread Thomas Mueller
Hi, TEXT is currently mapped to CLOB. Unfortunately I don't have a workaround for you, I'm sorry. I will add a feature request to allow to remap such data types, but it will take some time until this is implemented. Regards, Thomas On Mon, Oct 20, 2008 at 10:06 PM, [EMAIL PROTECTED] [EMAIL

Re: database size - cause of my out of heap space error?

2008-10-23 Thread Thomas Mueller
Hi, Thanks for your mail! So far I could not reproduce the problem. Could you (that would be idea) create a simple test case? If not, could you run the test with the trace settings, using a fresh database? Just append ;TRACE_LEVEL_FILE=3 to the database URL, and then post the .trace.db file.

Re: clustered index - supported?

2008-10-23 Thread Thomas Mueller
Hi, From what I understand, a non-clustered index will store a key-value mapping outside of the database where the keys are ordered and the values are locations of records. A clustered index will actually store records in sorted order within the database itself, or so I think. There is a

Re: CSVREAD is consuming a lot of memory

2008-10-23 Thread Thomas Mueller
. Regards, Thomas On Oct 23, 8:06 am, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, A solution is to use CREATE TABLE Contents(c1 SMALLINT, id SMALLINT, Bid SMALLINT, Seq SMALLINT, off VARCHAR(10), Duration VARCHAR(10), Line VARCHAR(1)) AS SELECT * FROM CSVREAD... Regards, Thomas On Wed

H2 Database Engine: New version 1.1.102 available

2008-10-24 Thread Thomas Mueller
Hello, A new version of H2 is available for download at http://www.h2database.com (you may have to click 'refresh'). Changes and new functionality: Changes and new functionality: - The French translation of the H2 Console has been improved by Olivier Parent. - Translating the H2 Console is

Re: DiskFile.flushRedoLog corruption concern

2008-10-25 Thread Thomas Mueller
Hi, I've taken a look at the flushRedoLog method in the DiskFile. I may be wrong, but could you explain how it supposed to work. It is first writing all deleted blocks, and then the blocks that are not deleted. However for a given position, only the last entry is written. If my log

Re: DiskFile.flushRedoLog seems to be very inefficient with file writes.

2008-10-25 Thread Thomas Mueller
Hi, we noticed that the log flush is very inefficient. it writes out every block of 128 bytes as a separate file write. On slow files systems (flash) this causes a ton of unnecessary overhead. I never tested flash file systems. Based on your description, regular database operations are

Re: Trigger on Views to make them changable

2008-10-25 Thread Thomas Mueller
Hi, it is possible to set a trigger on a view. So it could be possible to make a changable view with a trigger. But in the class org.h2.table.TableView an exception in the methods addRow and removeRow is thrown. It should be possible to make the throwing von exceptions in this methods

Re: Bitmap index

2008-10-26 Thread Thomas Mueller
Hi, I cannot find anything about bitmap index in the documentation. I suppose its not implemented am I right? Correct, bitmap indexes are not implemented. What are the best practices for columns with small amount of distinct values? There are no special best practices. How H2 treats

Re: database size - cause of my out of heap space error?

2008-10-26 Thread Thomas Mueller
Hi, Once my db shards grow beyond 500,000 records Sorry, what is a 'db shard'? Inserting 5 million records over 64 clean db shards happens in 3 minutes. So you mean 64 databases? After those shards get over 500,000 records - the whole insert takes 29 minutes. Maybe the system runs out

Re: Unsupported outer join condition

2008-10-26 Thread Thomas Mueller
Hi, I think I understand the problem now a bit better. I have a simple test case that also fails on H2, but works on PostgreSQL, MySQL and Apache Derby: create table a(id int); create table b(id int); create table c(id int); select * from a left outer join (b left outer join c on b.id = c.id)

Re: Hibernate automatic schema generation, PostgreSQL

2008-10-26 Thread Thomas Mueller
Hi, All of our unit tests are really functional tests that actually exercise Postgres. So your test cases work with PostgreSQL, but don't work with H2? setProperty(hibernate.dialect, org.hibernate.dialect.H2Dialect). Did you try using the PostgreSQL dialect for H2? That should work -

Re: problem with sequences in schema

2008-10-26 Thread Thomas Mueller
Hi, This is an incompatibility with PostgreSQL. I will fix that in the next release. A workaround is to use: select nextval('CONF', 'REPORT_ID_SEQ'); Unfortunately this is not supported by PostgreSQL. Regards, Thomas On Sat, Oct 25, 2008 at 4:24 AM, Limbic System [EMAIL PROTECTED] wrote:

Re: DiskFile.flushRedoLog corruption concern

2008-10-26 Thread Thomas Mueller
Hi, This does not seem to be the case though... You are right, thanks for the test case! Obviously I forgot why the code is like that. I should have documented it better... I think I remember now why all delete entries need to be written first: Because delete entries are always 1 block, while

Re: clustered index - supported?

2008-10-27 Thread Thomas Mueller
Hi, At the moment I'm doing more thorough benchmarks that I've created. If you are running benchmarks, could you benchmark them please? To do that use java -Xrunhprof:cpu=samples,depth=8 ... - and then upload/post the file java.hprof.txt If the benchmark application is not a self contained

Re: build jarSmall

2008-10-28 Thread Thomas Mueller
Hi, Hi. I am using Win XP and my H2 version is 1.1.100. I tried to 'cd' to the \h2 directory in my command prompt and type in 'build jarSmall' and it showed Error: JAVA_HOME is not defined. 'javac' is not recognized as an internal or external command, operable program or batch file. You

Re: need something , like rollup grouping() in sqlserver2000

2008-10-28 Thread Thomas Mueller
Hi, Sorry this is not possible at the moment. There is a feature request already, but it will take some time until this is available. A workaround is: select xm, sum from( select '' o, '总计' xm, sum(je) sum from #t union all select col1 o, col1, sum(je) from #t group by col1 union all select col1

Re: Error: Cannot parse date constant 2042-10-12

2008-10-29 Thread Thomas Mueller
Hi, It works for me. Could you run this and post the result? System.getProperties().list(System.out); Thanks, Thomas On Wed, Oct 29, 2008 at 6:01 PM, Piercio [EMAIL PROTECTED] wrote: I am using H2 1.1.102 in embedded mode, and could not insert the date 2042-10-12 in the database. Using

Re: performance problem adding column w/ MVCC

2008-10-29 Thread Thomas Mueller
Hi, Thanks a lot for the test case! I am working on a fix for this problem now. I believe this will be fixed in the next release. The problem is that for MVCC the rows are copied in one large transaction (CREATE TABLE... and then INSERT INTO .. SELECT). I will try to use CREATE TABLE ... AS

Re: Trigger on Views to make them changable

2008-10-29 Thread Thomas Mueller
Hi, Eclipse doesn't need to 'handle' them. Those are regular Java block comments. By default the source code uses Java 1.6 features, however Java 1.4 and 1.5 are supported as well. To disable Java 1.6 specific features, run: build switchSource See also http://www.h2database.com/html/build.html

Re: Error: Cannot parse date constant 2042-10-12

2008-10-31 Thread Thomas Mueller
much. On Oct 29, 4:10 pm, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, It works for me. Could you run this and post the result? System.getProperties().list(System.out); Thanks, Thomas On Wed, Oct 29, 2008 at 6:01 PM, Piercio [EMAIL PROTECTED] wrote: I am using H2 1.1.102 in embedded mode

Re: FullText.dropIndex bug

2008-10-31 Thread Thomas Mueller
Hi, FullText.createIndex(conn, PUBLIC, TEST, null); FullText.dropIndex(conn, PUBLIC, test); The table name is case sensitive like the DatabaseMetaData methods, that means it must match the table name as it is stored in the database. So you need to write:

Re: Accessing the H2 SQL parser

2008-10-31 Thread Thomas Mueller
Hi, I was wondering is it possible to use H2 to parse sql and get some kind of abstract syntax tree. I have looked and it does not appear to be easy to use in this way. Can someone confirm this? It depends what you need. When parsing (class Parser), H2 constructs objects of type 'Prepared'

Re: MAX_LOG_SIZE in kbytes?

2008-10-31 Thread Thomas Mueller
Hi, Would that be possible to make a change so that MAX_LOG_SIZE can also be specified in kilobytes? Something like, if the value ends in 'K', it means kilobytes, Nothing or 'M' at the end means megabytes. I would rather solve the performance problem. SET MAX_LOG_SIZE=1 // setMaxLogSize(1

Re: org.h2.jdbc.JdbcSQLException: The object is already closed [90007-100]

2008-10-31 Thread Thomas Mueller
Hi, PreparedStatement pstmt = connection.prepareStatement(); ... ResultSet rs = pstmt.executeQuery(); while(rs) { a lot of small request generated from rs content } Most likely the problem is that the result set is closed while processing the nested requests. Currently H2 uses a

Re: Server in Mixed Mode + embedding H2 Console, single file DB in webapp

2008-10-31 Thread Thomas Mueller
Hi, my scenario: web application using H2 for demo purposes. I'm not sure, did you already read the documentation at http://www.h2database.com/html/tutorial.html#web_applications We'd like to embed the H2 Console into the existing web application, so it's reachable on the same

Re: H2 and jTable

2008-10-31 Thread Thomas Mueller
Hi, What is the best way to show H2 content in jTable? I don't know JTable. I suggest to use Google and search for jtable jdbc or (if you use Hibernate) jtable hibernate. getValueAt - SELECT * FROM table1 WHERE id = ? My idea is to cache ResultSet in case next getValueAt would point to

Re: Error: Cannot parse date constant 2042-10-12

2008-11-03 Thread Thomas Mueller
because it's slow, complicated, and seems to be buggy. However it will take some time until this is done, and it can't solve problems with java.sql.Date / Time / Timestamp. Regards, Thomas On Fri, Oct 31, 2008 at 4:19 PM, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, FYI I am discussing

Re: database size - cause of my out of heap space error?

2008-11-03 Thread Thomas Mueller
, so they ought to be GCd (or so I think). -Julian On Oct 29, 1:50 pm, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, but as the tables get beyond 500,000 rows ... the performance gets brutally slow. I can't reproduce this so far. Could it be a cache / memory problem? If you

Re: How many apps at same time?

2008-11-03 Thread Thomas Mueller
Hi, I have a question about the embedded mode: How many applications can read/write the db files at same time? You can have multiple connections. By default access to the database is serialized however. To disable this, call SET MULTI_THREADED 1 - see

Re: MAX_LOG_SIZE in kbytes?

2008-11-03 Thread Thomas Mueller
Hi, Yes, we use LOG=2 It obviously helps, but when the log file gets big, it still takes several minutes to work through it. What version of H2 do you use? Could you profile the application to find out why it takes so long? To do that, write a simple application that only connects to the

Re: h2 console is very slow

2008-11-03 Thread Thomas Mueller
Hi, Could you try connecting to the server using localhost? Just replace the ip address with 'localhost'. For me, the default URL is: http://192.168.0.100:8182 but this also works: http://localhost:8182 If this solves the problem then maybe it is a firewall / virus scanner problem. Could you

Re: spring getJdbcTemplate().queryForList can't work right

2008-11-03 Thread Thomas Mueller
Hi, I don't know Spring getJdbcTemplate. Maybe Spring uses ResultSetMetaData.getColumnName instead of getColumnLabel. There is a way to change the behavior of H2: you need to set the system property h2.aliasColumnName to 'true', see also

H2 Database Engine: New version 1.1.103 available

2008-11-07 Thread Thomas Mueller
Hello, A new version of H2 is available for download at http://www.h2database.com (you may have to click 'refresh'). Changes and new functionality: - New column INFORMATION_SCHEMA.COLUMNS.SEQUENCE_NAME. - Aliases for built-in data types can now be re-mapped. - Improved PostgreSQL compatibility

Re: override default URL into the console

2008-11-10 Thread Thomas Mueller
Hi, When I first load up the console shouldn't the JDBC URL be defaulted to the one in on the context-param? Or do I have it in the wrong place? The default database URL of the console is stored in the user preferences, for Windows, that is: C:\Documents and

Re: EclipseLink support

2008-11-10 Thread Thomas Mueller
Hi, Thanks for your help! I have voted for the bug. Regards, Thomas On Sat, Nov 8, 2008 at 8:44 PM, btyla [EMAIL PROTECTED] wrote: Hi, EclipseLink is Oracle's TopLink code donated to the Eclipse foundation to build the JPA 2.0 reference implementation. EclipseLink is currently lacking

Re: cascading deletes?

2008-11-10 Thread Thomas Mueller
Hi, Is there a way to truncate a table with cascade, so that all rows in other tables which reference the table being deleted are also deleted? Sorry, there is now way to do that (that I know of). I will add a feature request for Support TRUNCATE .. CASCADE like PostgreSQL, but unless other

Re: EclipseLink support

2008-11-11 Thread Thomas Mueller
Hi, the code of the H2 Platform class suggested in the bugzilla issue above fails with CLOB/BLOB fields because of the issue we discussed earlier. This problem will be solved in the next release. Details: ResultSet.getObject for CLOB or BLOB will return a java.sql.Clob / java.sql.Blob object

Re: Is database closed when Connection.close() returns?

2008-11-11 Thread Thomas Mueller
Hi, I got a database with one open connection. If I call close() will the database be closed for good after the call returns? By default, yes, the database is closed when the last connection is closed. You can prevent that using the DB_CLOSE_DELAY, see also

Re: override default URL into the console

2008-11-11 Thread Thomas Mueller
Hi, Is there a way to override the default? I want to be able to ship a custom properties file that automatically has the JDBC URL set and not have it get created and set in that temp folder. You could just include a 'good' properties file as a resource in your application and overwrite the

Re: What is lowest possible cache size?

2008-11-19 Thread Thomas Mueller
Hi, I plan to use H2 for a very small database (two tables with column pair key-value) The default cache size is 20 MB and thats too much because I am having two embedded databases opened in one java process. Thats 20+20 = 40 MB of cache. What is recommended cache value for such a small

Re: Integer out of range problem

2008-11-20 Thread Thomas Mueller
Hi, The problem for AVG will be fixed in the next release. There is a problem for SUM as well: it can overflow when using large values. In the next release, SUM will return a data type that is safe. I hope this will not break applications that call ResultSet.getObject and expect the old data

Re: different FROM order hangs database

2008-11-20 Thread Thomas Mueller
. If it does not, you could change the system property, or (even better) store the result of FTL_SEARCH in a temporary table first. Regards, Thomas On Mon, Nov 17, 2008 at 7:21 PM, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, Could you run SCRIPT NODATA TO 'test.sql'; and then send me this file

Re: General error: java.lang.RuntimeException:

2008-11-20 Thread Thomas Mueller
Hi, I am sorry to say that, but it looks like a corruption problem. I am very interested in analyzing and solving this problem. Corruption problems have top priority for me. I have a few question: - Could you send the full stack trace of the exception including message text? - What is your

Re: How to lock a table

2008-11-20 Thread Thomas Mueller
Hi, Multi version concurrency is specially made to avoid blocking readers. But it looks like you want to explicitly lock readers. So you can't use Multi-version concurrency. In H2, what you could do is: Open two connections. On both connections, call: SET LOCK_TIMEOUT 60 * 1000 (that is one

Re: Standalone SQL parser based on the H2 Parser code

2008-11-24 Thread Thomas Mueller
, Thomas Mueller [EMAIL PROTECTED] wrote: Hi, I am not working with hibernate so I won't be much help with that, but I am all for completing/improving the parser bit of it. The source archive is only about 50kb, I won't email it to the list. Would you like me to email it to you perhaps

Re: H2 Cache

2008-11-24 Thread Thomas Mueller
Hi, We are using the H2 database for creating permanent tables that contain huge data sets. This table gets deleted automatically after a certain time interval. We have our own cache clearing logic that works every hour on H2 but the tables get deleted automatically by the H2 caching

Re: Compatibility and connection with PostgreSQL

2008-11-24 Thread Thomas Mueller
Hi, I am trying to replace a PostgreSQL database with H2. In that case, you need to use the H2 JDBC driver (org.h2.Driver instead of org.postgresql.Driver), and the H2 JDBC URL (jdbc:h2:... instead of jdbc:postgresql:...). First, I connected normally : Class.forName(org.h2.Driver);

Re: Generating integer number series in H2

2008-11-24 Thread Thomas Mueller
Hi, I didn't know about generate_series, maybe I will support it in future versions. H2 supports this: SELECT X FROM SYSTEM_RANGE(1, 100); Regards, Thomas On Mon, Nov 24, 2008 at 8:51 PM, Marek Kubis [EMAIL PROTECTED] wrote: Hi I'd like to generate integer number series in my queries

Re: H2 Web console problem

2008-11-25 Thread Thomas Mueller
Hi, If you create a database with 100 or more tables, the tree menu which lists all the tables doesn't seem to work properly. That's not a bug it's a feature. For some databases reading the schema is really slow, and I wanted to avoid that when there are many tables. However for H2 it's not

Re: Multiple Connections to DB

2008-12-01 Thread Thomas Mueller
Hi, The stacktrace is : org.h2.jdbc.JdbcSQLException: Connection is broken [90067-100] When I connect Squirrel SQL, I use the absolute path like jdbc:h2:tcp://localhost:9092/data/servers/glassfish/domains/myApp/ config/db If you use the server mode, you need to start a server. I'm not sure

Re: Lucene full text search: specifying index fields / search weights on fields

2008-12-01 Thread Thomas Mueller
Hi, Is there a way to specify how Lucene should index (e.g. multiple fields / different analyzer per field (based on the columns)) and query (e.g. different weight on each field) the columns with full-text search? This doesn't need to be SQL solution, I'm fine if there is a Java API to do

Re: weird select behavior

2008-12-01 Thread Thomas Mueller
Hi, select id, convert(text,int) as number from test where type='int' This will first check the condition and then convert only the rows where it's not a problem. select * from (select id, convert(text,int) as number from test where type='int') where number 1 will throw an exception

Re: NO SUITABLE DRIVER

2008-12-01 Thread Thomas Mueller
Hi, application with a H2 db it tells me NO SUITABLE DRIVER You probably don't have the h2*.jar file in your class path. Could you check if the jar file is in the class path by calling Class.forName(org.h2.Driver); in your application? Regards, Thomas

Re: FULL OUTER JOIN in H2

2008-12-03 Thread Thomas Mueller
Hi, I have seen that is in priority 2 - can you give some wild guess about availability of this feature ? The wild guess is middle of next year (unless somebody else implements this feature of course). Regards, Thomas --~--~-~--~~~---~--~~ You received this

Re: Error Information

2008-12-03 Thread Thomas Mueller
Hi, I am sorry to say that, but it looks like a corruption problem. I am very interested in analyzing and solving this problem. Corruption problems have top priority for me. I have a few question: - What is your database URL? - Did you use multiple connections? - The first workarounds is:

Re: H2 Cache

2008-12-04 Thread Thomas Mueller
Hi, I would have sent you a snippet but we have a lot of other dependencies which could also probably lead to this unwanted deletion of tables. You could append ;TRACE_LEVEL_FILE=3 to the database URL to find out how data is deleted. Just check the .trace.db file. See also

Re: Determine when a table has changed

2008-12-04 Thread Thomas Mueller
Hi I think a trigger is the most database independent solution. About CHECKSUM TABLE: the MySQL docs say that the fact that two tables produce the same checksum does not mean that the tables are identical. H2 internally keeps a modification counter for each table, I will make it available in

Re: MySQL and String

2008-12-04 Thread Thomas Mueller
Hi, FYI there is now an issue http://code.google.com/p/h2database/issues/detail?id=46 - progress is tracked there from now on. Thanks for your help! Regards, Thomas On Tue, Dec 2, 2008 at 7:21 PM, Milhous [EMAIL PROTECTED] wrote: Is there a way to tell the create to use VARCHAR(20) instead

Re: org.h2.tools.Shell can't execute query with comments.

2008-12-04 Thread Thomas Mueller
Hi, This is a bug in the Shell tool, it will be fixed in the next release. A workaround is to use block comments (/* */) instead of line comments. I think H2 is more suitable than Derby for Sun's JDK too. At the time Sun chose Derby, H2 didn't exist yet. Now has IBM reduced their commitment

Re: Multiple Connections to DB

2008-12-05 Thread Thomas Mueller
Hi, The connection pool of the Glassfish domain use the mixed mode with this url : jdbc:h2:./db/slenticketdb;auto_server=true This means the server listen on a tcp port choosen by itself, right ? Yes. When a client like SQuirrel SQL must be connected to the database server, it should

Re: Multiple Connections to DB

2008-12-05 Thread Thomas Mueller
Hi again, The connection pool of the Glassfish domain use the mixed mode with this url : jdbc:h2:./db/slenticketdb;auto_server=true Actually there is a problem. You are using a relative path: ./db/... That's a bit dangerous as it depends on the current working directory, which is probably

Fwd: Poleposition benchmarks

2008-12-07 Thread Thomas Mueller
Hi, When I tried, H2 was about double as fast as HSQLDB. See http://www.h2database.com/html/performance.html#poleposition_benchmark - I run the test again today and got this result: Overall time taken - HSQLDB: 155'263ms - H2: 71'275ms There are a few problems with the PolePosition test: *

Re: Customize connection used by LinkedTable

2008-12-08 Thread Thomas Mueller
Hi, Now I'm using LinkedTable objects under following conditions : ACCESS_MODE=R OPEN_NEW=TRUE SHARE_LINKED_CONNECTIONS=TRUE When I issue SELECT statement which use JOIN clause, SQLException is thrown because ResultSet is closed under the condition. the JDBC I use seems to close all

Re: h2 and spring

2008-12-08 Thread Thomas Mueller
Hi, bean id=h2web class=org.h2.tools.Server factory-method=createWebServer init-method=start destroy- method=stop constructor-arg value=-browser / /bean createWebServer does not support the argument '-browser'. This is only supported by the

Re: DBSDL: Database Schema Definition Language

2008-12-09 Thread Thomas Mueller
Hi, Thanks! I will add a link to your project. What about calling it a XML to SQL schema converter? Of course that's still not exact, but quite close. Regards, Thomas On Sun, Dec 7, 2008 at 7:48 PM, trashgod [EMAIL PROTECTED] wrote: H2 users might be interested in the DBSDL project, which

Re: My experience and gotcha's porting to H2

2008-12-10 Thread Thomas Mueller
Hi, Some more answers: insert into ... (select ... from) @rownum:[EMAIL PROTECTED] I have implemented this now, it will work in the next release. Query timeouts: statement.setQueryTimeout(15/*seconds*/); is not working I can't reproduce this problem. What version of H2 do you use? Maybe

Re: Database Url in classpath

2008-12-10 Thread Thomas Mueller
Hi, If you know the jar file name, you can use the zip file mechanism. See also: http://www.h2database.com/html/features.html#database_in_zip There is a way to find out the name of the jar file, but it's a bit tricky. I'm not sure if this works in your case: System.out.println(

Re: Patch for org/h2/expression/JavaFunction.java

2008-12-10 Thread Thomas Mueller
Hi, Thanks a lot for your help! That's great, a patch and a test case! I will integrate it in the next release. Regards, Thomas On Tue, Dec 9, 2008 at 8:13 PM, Eric Faulhaber [EMAIL PROTECTED] wrote: Hi Thomas, The following patch for subversion revision 1121 fixes a scale problem with

  1   2   3   4   5   6   7   8   9   10   >