Re: Are deadlocks preventable?

2013-05-20 Thread Ryan How
Well you could get a global database lock with every transaction, it would kill concurrency, but you'd be ensured to never get a deadlock :P Sorry, not very helpful :), but no-one else has replied on here :) On 18/05/2013 7:58 AM, Gili wrote: Hi, I wanted to get your opinion regarding http:

Re: Dropbox and H2

2013-05-09 Thread Ryan How
I'm not sure how dropbox handles open files, but regarding multiple files h2 should be fine as everything is in 1 file. If you have separate lobs or fulltext index that might be a problem. You could regenerate full text index, but if lobs are out of sync I don't know how it would handle it. So

Re: Dropbox and H2

2013-05-08 Thread Ryan How
Dropbox just syncs a folder on the local PC. So it depends on what you want to do with it? If you want to use it on more than 1 PC at a time it won't work (You'll just get conflicts). Otherwise it should work ok I think. ? I'm not sure how dropbox accesses in use files. But it might only sync o

Re: H2 error when running.

2013-05-07 Thread Ryan How
Can you paste a stack trace of what error you are getting? And what URL are you using to connect to the database? Thanks, Ryan On 8/05/2013 1:54 PM, khang phamngoc wrote: I used H2DB for my project, well evrything seem good but 2 days ago when I'm using it, my computer shut down so when I conn

Re: Is it possible to renew the execution plan for a view?

2013-05-01 Thread Ryan How
Strange that it took > 10 minutes to reproduce it? That would almost be consistent with the "sub-optimally executed" view? I'm wondering whether it might be a caching thing? It's hard without a reproducible test case. I'm just guessing what it might be and trying to narrow down the circumstanc

Re: CPU utilization is 100% for huge records transaction

2013-05-01 Thread Ryan How
You can try it and see if it works.-Xmx7000m or something like that. But you may keep running out of memory. It might just be too much data to fit. You might be better off trying using a file based database on an SSD? On 2/05/2013 12:03 AM, neelima kaliki wrote: So, if i increase my memory from

Re: CPU utilization is 100% for huge records transaction

2013-05-01 Thread Ryan How
Sounds like you are running out of memory. What is the memory usage of the java process? and what JVM parameters are you using? You'd expect CPU to be maxed out for an in-memory database. Something would have to max out. On 1/05/2013 9:40 PM, neelima kaliki wrote: Below are my System deta

Re: Bug fix in 170: Fix for a bug where we would sometimes use the wrong unique constraint to validate foreign key constraints.

2013-04-29 Thread Ryan How
ct, but in my copy it is incorrect. Thanks, Ryan On 29/04/2013 7:54 PM, Noel Grandin wrote: Hmm, looks like a bug. If you can provide a reduced test case, I can take a look at fixing it. On 2013-04-29 04:54, Ryan How wrote: Hi, I came across this bug in version 169 causing issues (Well I th

Re: Is it possible to renew the execution plan for a view?

2013-04-23 Thread Ryan How
Wow, that isn't a simple query is it :) Nothing seems obvious does it. And if you re-create the view then you get the same execution plan as running the select directly? I think you'll need someone much more knowledgeable than me helping. Hope you get it sorted! I'd only be trying different

Re: Is it possible to renew the execution plan for a view?

2013-04-23 Thread Ryan How
If you can post the create view statement & running the select manually, both with the execution plans, then it might provide some insight? You also say if you drop and re-create the view then it is better?. Are you creating the view, then populating the tables, then running the view? You coul

Re: New database corruption

2013-04-22 Thread Ryan How
e: Hi, I would be interested in the database files (*.db, including the trace file if there is one). It would be great if you could send them to me. Regards, Thomas

Re: New database corruption

2013-04-16 Thread Ryan How
Sorry, you might have said in another post, but what connection string are you using? Are you using it over a network drive? OS? Any Out of Memory errors on this database? Thanks, Ryan On 17/04/2013 12:13 PM, TrendTimer.com wrote: Also, I'm using version h2-1.3.171.jar On Tuesday, April

Re: Is it possible to call H2 from bash

2013-04-15 Thread Ryan How
Or you could try something like this https://github.com/flatland/drip On 15/04/2013 3:56 PM, Ryan How wrote: It would be like this for any java program you call from a bash script. I'm not sure if you can maybe start a postgres server in H2 and use a postrgres command line tool? Only

Re: Is it possible to call H2 from bash

2013-04-15 Thread Ryan How
It would be like this for any java program you call from a bash script. I'm not sure if you can maybe start a postgres server in H2 and use a postrgres command line tool? Only other alternative would be to write a little java daemon you could leave running which you could send commands to from

Re: Moving ".h2.server.properties" file to another folder/installation dir possible?

2013-04-10 Thread Ryan How
what happens if you don't put a leading / ? It would appear that it would try and load it from the root if you start with a leading /, and without it, it would try and load from the current working directly. So I'd try omitting the leading / and making sure the current working directory is set

Re: Possibility to limit the reach-ability of a server

2013-03-25 Thread Ryan How
I think limiting to a subnet would be the job of a firewall rather than in the H2 database directly. I wonder if there is some hook in H2 for when a user connects, you could then disconnect the user based on whatever criteria you like. Maybe it would be better to enabled a custom security hand

Re: Importing Database from MySQL Dump

2013-03-21 Thread Ryan How
There may be a 3rd party tool which exists which can extract schema and apply it to another database. I'm sure it would be a common problem to copy schema from one database to another one. Or you could try and manipulate the file into a format which H2 can understand. On 21/03/2013 10:27 P

Re: Understanding threads

2013-03-20 Thread Ryan How
The key to thinking about it is that it syncrhonizes on the database. Just a java synchronized code block. So when a statement executes, it executes code within H2, which is synchronised on the database. Once that statement has finished executing and returns back to the control of your program

Re: Understanding threads

2013-03-19 Thread Ryan How
Hi, I'll try and help a little bit. "So my starting point is to use the default option MULTI_THREADED=0, and to not use MVCC." Good starting point. Only use them if it might really help your specific use case. "Internally, most requests to the same database are synchronized." "Does this mea

Re: Fulltext Search on BINARY columns

2013-03-08 Thread Ryan How
Mar 8, 2013 at 2:52 AM, Ryan How wrote: I think you've figured it out yourself. You'd have to have a pretty compelling use case to use a BINARY column for a PK I think. It would be very inefficient! Unless it is a really small BINARY

Re: Fulltext Search on BINARY columns

2013-03-07 Thread Ryan How
I think you've figured it out yourself. You'd have to have a pretty compelling use case to use a BINARY column for a PK I think. It would be very inefficient! Unless it is a really small BINARY column. On 7/03/2013 10:23 PM, Zach wrote: I have a table with a BINARY column that acts as a primary

Re: Concurrent operations on LOBs

2013-03-04 Thread Ryan How
It depends on your use case I think. I recently had 10MB objects reading into memory... but it wasn't very optimal and I did get OOM errors :). I'm sure 1024 characters would be fine ;). It's probably faster than with CLOBS as they'll be inline so one less pointer to follow. I'd just test it a

Re: Concurrent operations on LOBs

2013-02-28 Thread Ryan How
Side note: LOCK_MODE has no effect with MVCC. There is also a FOR UPDATE bug with LOBS in MVCC. My guess is these issues won't get fixed unless you submit a patch as the devs are working on a new storage backend which should solve all the issues. You could try BINARY? I think it stores the ob

Re: MVCC and SELECT FOR UPDATE

2013-02-27 Thread Ryan How
Thanks for the clarification. That explains the time out exceptions and also makes perfect sense using FOR UPDATE. On 27/02/2013 10:03 PM, Noel Grandin wrote: Correct. It's the OPTIMISTIC CONCURRENCY strategy applied to database modifications. It looks like this: while (true) {

Re: MVCC and SELECT FOR UPDATE

2013-02-27 Thread Ryan How
;m having trouble thinking of a use case for this. Thanks, Ryan On 27/02/2013 4:49 PM, Noel Grandin wrote: On 2013-02-27 10:19, Ryan How wrote: This doesn't really help, but I thought the idea of MVCC is to be an optimistic lock?. So by definition it shouldn't be able to tim

Re: MVCC and SELECT FOR UPDATE

2013-02-27 Thread Ryan How
database sequence or a random ID. On 27/02/2013 4:28 PM, Ryan How wrote: A more helpful reply. The exception given seems to give a clue. Caused by: org.h2.jdbc.JdbcSQLException: Concurrent update in table "UNIQUE_a_INDEX_A": another transaction has updated or deleted the same row I

Re: MVCC and SELECT FOR UPDATE

2013-02-27 Thread Ryan How
A more helpful reply. The exception given seems to give a clue. Caused by: org.h2.jdbc.JdbcSQLException: Concurrent update in table "UNIQUE_a_INDEX_A": another transaction has updated or deleted the same row It would seem you are updating the row simultaneously in 2 transactions?, Therefore gi

Re: MVCC and SELECT FOR UPDATE

2013-02-27 Thread Ryan How
This doesn't really help, but I thought the idea of MVCC is to be an optimistic lock?. So by definition it shouldn't be able to timeout as it doesn't even need to get a "lock" ? Or am I grossly misunderstanding something here? Does "FOR UPDATE" still lock a table for other "writers", it just do

Re: H2 Concurrency performace issue...Please help

2013-02-20 Thread Ryan How
Apart from trying to optimise the queries, use a Faster CPU?. You could profile H2 and see where most of the CPU time is being used and see if you can make any improvements to the H2 code. But you are probably at the limit of what you can do with this architecture? On 21/02/2013 1:42 PM, Sri

Re: alter alias SYSDATE

2013-02-19 Thread Ryan How
You could create your own function or alias eg. MySysDate. Then have it call SysDate, or your own function. -- 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-da

Re: ODBC Error

2013-02-17 Thread Ryan How
That looks a bit messed up! I'm not sure sorry, apart from trying different versions of drivers, etc. and setting H2 to trace level logging. Does it work if you try it with postgres server? It feels like it might be a bit of work sorting this out, and a bit of trial and error. I know it us

Re: ODBC Error

2013-02-17 Thread Ryan How
I always used to have problems when using Access with H2 via the postgres driver. At the time I tried just opening the simplest of databases first, and then working up to a more complex database. It ended up the problem was when opening a table that had a certain type of key defined. I can't re

Re: Durability problem on Android

2013-02-15 Thread Ryan How
I reckon UNDO_LOG=0, LOG=0, etc should spit out an error unless you have another flag, say ALLOW_DATA_LOSS_DATA CORRUPTION_AND_UNRELIABILITY=YES . It seems half the messages on the forum are about corrupted databases where there is LOG=0 in the URL. On 15/02/2013 10:17 PM, Noel Grandin wrote:

Re: Table Updates Not Appearing

2013-02-14 Thread Ryan How
You could try running a backup or a script to, then copy that and import it? I quite often don't close a H2 database and very rarely lose data. Actually in my dev environment I never close it, that's one thing I love about it :). Are you sure it's copying the right file?. Do the values show up

Re: Why is XTEA dropped

2013-02-11 Thread Ryan How
I hope they don't find a flaw in AES!. I'm sure if that happens H2 could implement another protocol very quickly and easily, especially seeing it's open source. But I'd be worried about my other 100 things encrypted with AES! On 12/02/2013 6:41 AM, Cecil Westerhof wrote: 2013/2/11 Thomas Muel

Re: H2 Concurrency performace issue...Please help

2013-02-04 Thread Ryan How
Did you work out what the bottleneck is? It sounds like it isn't the disk if in-memory is no faster. So it must be CPU bound. It might be as fast as H2 can go with that level of concurrency. If CPU usage isn't hitting near 100% then it maybe it is a synchronised section of code that is the bot

Re: H2 Concurrency performace issue...Please help

2013-01-30 Thread Ryan How
You could try cluster mode. Did you work out what the bottleneck is? If memory mode didn't make a difference I'd imagine it is CPU bound? What kind of performance increase are you trying to get? Ryan On 31/01/2013 8:55 AM, Sri wrote: Is there any way I can run multiple H2 instances on one m

Re: Improve COUNT query speed

2013-01-29 Thread Ryan How
You can use EXPLAIN to see what the query is doing. It might provide some insight. http://www.h2database.com/html/grammar.html#explain On 30/01/2013 1:23 PM, Pandu Purnama wrote: Using same tables as on the test case above, could someone please explain why these queries have significant diffe

Re: Status of MVCC (multi version concurrency)

2013-01-21 Thread Ryan How
execute any H2 method at once? That would seem to make table locking and row locking redundant, so I guess I've misunderstood - - could you explain? Thanks, Michael On 17/01/13 12:11, Ryan How wrote: I'm not sure how it works in a cluster, but H2 can only handle a single thread at a time, s

Re: Maximum number of databases

2013-01-18 Thread Ryan How
I think you'd just need to do a test and see. It probably depends on the size and complexity of your databases and what kind of queries you are running against them. Ryan On 19/01/2013 2:23 AM, Paul Barriscale wrote: Hi, I'm investigating H2 as a database for moving a desktop application t

Re: Status of MVCC (multi version concurrency)

2013-01-17 Thread Ryan How
Thomas On Sun, Jan 13, 2013 at 3:32 PM, Ryan How > wrote: I'm not sure sorry, someone else might be able to answer for you. I could only suggest give it a go and see if it works. I don't see why it wouldn't work, you are only changing

Re: Status of MVCC (multi version concurrency)

2013-01-13 Thread Ryan How
I'm not sure sorry, someone else might be able to answer for you. I could only suggest give it a go and see if it works. I don't see why it wouldn't work, you are only changing transaction isolation level. Thanks, Ryan On 13/01/2013 6:24 PM, Matouš Voldřich wrote: Thanks for answer. We will g

Re: Status of MVCC (multi version concurrency)

2013-01-12 Thread Ryan How
MVCC has been around for a while, so it is pretty stable. But I did find a bug the other day with "for update" and lobs, so it still has bugs. It isn't as well tested as the rest of the engine, and not as well supported :) Ryan On 11/01/2013 6:35 PM, Matous( Voldr(ich wrote: Hi, I would like

Re: Reading the transaction log of a database

2013-01-09 Thread Ryan How
Have you looked at SymmetricDs, it has support for H2. It uses triggers. http://www.symmetricds.org/doc/3.2/html-single/user-guide.html#ap02-h2 On 9/01/2013 9:38 PM, Lutz wrote: I am trying to implement replication with the H2 DB. Changes to the master database are supposed to be send to a sl

Re: java.lang.NullPointerException when deleting a record

2013-01-09 Thread Ryan How
No worries. Thanks!. Not too much point in fixing an "experimental" feature when it is going to be superseded soon with the MV Store. Which if I understand correctly will by nature work in MVCC mode? Thanks, Ryan On 10/01/2013 12:29 AM, Noel Grandin wrote: Sorry, but Thomas is busy working

Re: java.lang.NullPointerException when deleting a record

2013-01-09 Thread Ryan How
Can you confirm this? It doesn't do it without MVCC, so it would seem there is an error with MVCC and lobs with a "for update" on the select? Thanks, Ryan On 5/01/2013 7:33 AM, Ryan How wrote: Test Case public static void main(String... args) throws Exception {

Re: Corrupted DB - strange content in the db file

2013-01-08 Thread Ryan How
That is really strange!. I've been using H2 for quite a few years and never had a corrupted DB. What environment are you running on? And what connection string are you using? JVM version? And do you know when it happened?. Was the application running and crashed?. Or it was fine, then shutdown

Re: Adding a column to the lucene fulltext index?

2013-01-08 Thread Ryan How
My guess would be that you need to drop the index and recreate it? http://h2database.com/javadoc/org/h2/fulltext/FullTextLucene.html It doesn't look like it has a dropIndex() like the native fulltext search What happens if you add Index for the table again and specify the new column? On 8/0

Re: java.lang.NullPointerException when deleting a record

2013-01-04 Thread Ryan How
HelloHelloHelloHelloHelloHelloHelloHello')"); ResultSet rs = stat.executeQuery("select * from test for update"); while (rs.next()) { System.out.println(rs.getString("TEST_DATA")); } stat.close(); conn.close(); } On

Re: java.lang.NullPointerException when deleting a record

2013-01-04 Thread Ryan How
ble that the LOB was removed in the meantime (after running the query, but before accessing the row)? Regards, Thomas On Fri, Jan 4, 2013 at 2:51 PM, Ryan How <mailto:r...@exemail.com.au>> wrote: Hi, I'm getting a NullPointerException when trying to select a record

java.lang.NullPointerException when deleting a record

2013-01-04 Thread Ryan How
Hi, I'm getting a NullPointerException when trying to select a record. Table is: CREATE TABLE EMAIL_QUEUE (" + "EMAIL_QUEUE_ID LONG IDENTITY," + "EMAIL_DATA TEXT," + "ERROR_COUNT INTEGER," + "ERROR_TIME DATETIME" +

Web Console in an IFrame

2012-12-13 Thread Ryan How
Hi, I've embedded the web console in an IFrame on another page within my application. It seems the auto complete and clicking on a table to insert it into the query doesn't work. It doesn't seem to like not being the top level frame? Thanks, Ryan -- You received this message because you ar

Re: safety of MULTI_THREADED=1

2012-12-06 Thread Ryan How
I've been using it in production for a few years. I haven't had any specific issues related to multi-threading. I think it just hasn't been as well tested, and also is harder to test. There are a lot of different scenarios that can go on. On 6/12/2012 11:50 PM, Marc Schneider wrote: I'm also

Re: dropping JAQU?

2012-12-01 Thread Ryan How
I've been using it in a couple of small projects. It compliments H2 well... On Fri, Nov 30, 2012 at 12:45 PM, Noel Grandin > wrote: s it's time we dropped our org.h2.jaqu package ? Nobody seems to be being using it, a -- You received this message because

Re: Recovering using a .data.sql file

2012-11-26 Thread Ryan How
Just my 2 cents. But if a database is corrupt then it may not have referential integrity anyway. I think there is always going to be a level of manual recovery of a corrupted database. On 27/11/2012 6:54 AM, witerat wrote: I checked the org.h2.command.dml.Script class, in 1.3.169, it sorts tab

Re: H2 Concurrency performace issue...Please help

2012-11-13 Thread Ryan How
Other people might have some suggestions, but I guess if you try it on a solid state disk or just trial as an in memory database and see if it performs faster. Or you could also try it on a ram disk and see if it improves performance. That way you don't need to try any other hardware. At lea

Re: H2 Concurrency performace issue...Please help

2012-11-02 Thread Ryan How
Hi, Makes sense to me. If cpu isn't the issue (which I doubt it would be in a database, but maybe the encryption adds a lot of overhead?) then adding more threads would increase the time proportionally + synchronisation overhead. Also there would be more work for the disk seeking between all

Re: H2 Concurrency performace issue...Please help

2012-11-01 Thread Ryan How
How about disk io?, usually the disk is the bottleneck. On 2/11/2012 3:44 AM, Sri wrote: Hi, I am running H2 DB in server mode and using it for read only. It's been performing very good with single user/thread and the performance is getting degraded as I add more concurrent users/threads. S

Re: Using h2 in eclipse RCP app

2012-10-24 Thread Ryan How
Hi, I'm too familiar with building an eclipse RCP application, but according to this thread https://groups.google.com/forum/?fromgroups=#!topic/h2-database/7k5-VfZtF6Q The jar is already an osgi bundle? Or do y

Re: H2 In-Memory Database Cache and H2 Performance vs. MySQL Performance

2012-10-11 Thread Ryan How
I'm pretty sure he is using an in memory db. So this shouldn't matter? On 11/10/2012 11:57 PM, Brian wrote: 2.) How much memory the JVM was launched with, and what you've set (or not) the CACHE_SIZE to for H2 - which plays a huge role in performance - usually second only to not using any index.

Re: H2 In-Memory Database Cache and H2 Performance vs. MySQL Performance

2012-10-11 Thread Ryan How
On 11/10/2012 4:25 PM, snookerms wrote: The problem is the index, when he is not set optimized, then the effekt like in the description is there. Sorry, what do you mean by this? It is not using the index? -- You received this message because you are subscribed to the Google Groups "H2 Data

Re: H2 In-Memory Database Cache and H2 Performance vs. MySQL Performance

2012-10-08 Thread Ryan How
Have you tried running explain analyze on your query? That might shed some light. Have you got an index on products_ort for the first query? http://www.h2database.com/html/grammar.html#explain On 4/10/2012 1:10 AM, snookerms wrote: Am Mittwoch, 3. Oktober 2012 15:06:19 UTC+2 schrieb Kartw

Re: Version 1.3.169 on Maven Central

2012-10-04 Thread Ryan How
From Another post. "Hi, The reason why the newest jar file is not in the Maven Central repository is described in the change log, http://www.h2database.com/html/changelog.html : The new jar file will probably not end up in the central Maven repository in the next few weeks because Sonatype

Re: H2 In-Memory Database Cache and H2 Performance vs. MySQL Performance

2012-10-03 Thread Ryan How
Thanks! Did you try a more recent version of H2? Or is that not an option? On 4/10/2012 1:10 AM, snookerms wrote: Software: Ubuntu Server 12.04 Openjdk-7-jdk H2 v.2010.07.13 -- You received this message because you are subscribed to the Google Groups "H2 Databa

Re: H2 In-Memory Database Cache and H2 Performance vs. MySQL Performance

2012-10-03 Thread Ryan How
That does sound a bit drastic!. Would be good if the JIT compiler made everything 41 times faster :). I'm really not sure sorry. I think if you can post a reproducible test case then someone will work it out! Perhaps it might be that the OS is swapping your data to disk, and on repeated quer

Re: H2 In-Memory Database Cache and H2 Performance vs. MySQL Performance

2012-10-02 Thread Ryan How
Maybe this is due to the JIT compiler optimising it? On 2/10/2012 6:31 PM, snookerms wrote: I'm running a SQL-Query the first time it takes 1540ms. The Second time it take 749ms and the third time 503ms and so on. -- You received this message because you are subscribed to the Google Groups "H

Re: IDENTITY COLUMN JUMPING BY 32

2012-10-02 Thread Ryan How
Hi, I'm pretty sure the reason is because H2 caches the next 32 identity values, so if you close the database and open it again, then it will skip those values. There isn't a guarantee that it always increment by 1. Pretty sure if you roll back transactions then it skips the value also. I'm s

Re: unable to connect to to the same database from two different processes (using server mode)

2012-09-23 Thread Ryan How
Not sure what is going on, but it definitely works, must be something not right in what you are doing. How are you starting the tcp server? On 22/09/2012 2:47 AM, spacewiz wrote: Hello, I'm not sure what's wrong, I'm not able to connect to the same database from two processes at the same ti

Re: Jython with h2

2012-09-18 Thread Ryan How
Do you need to do a Class.forName("org.h2.Driver") first to actually load the class? I dunno how that translates to Jython. On 18/09/2012 4:16 PM, Pranav Prakash wrote: I am trying to get h2 working with Jython, here is what I am trying import sys import os curr_dir = os.getcwd(

Re: Transaction log issue with h2 database 1.1.114

2012-09-05 Thread Ryan How
It sounds like the design of the software is the issue. It needs to not keep a transaction open for so long. Can you not use transactions and just use auto commit to commit after every statement? If a nasty workaround is what you are after :) On 5/09/2012 7:39 PM, Radha Krishna wrote: Thanks

Re: MERGE enhancement: optional DELETE flag

2012-09-03 Thread Ryan How
On 3/09/2012 3:29 AM, Thomas Mueller wrote: (as part of the new multi-version storage backend). This sounds exciting :) -- 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 unsu

Re: MERGE enhancement: optional DELETE flag

2012-08-30 Thread Ryan How
I find I do operations like this all the time. It is kind of like doing a synchronisation of data. So when importing data I don't need to clear the table then import it all again, I can update existing, add new and remove old. I usually like to know what was inserted, what was updated, what wa

Re: Create a in-memory Database and save it to the filesystem

2012-08-03 Thread Ryan How
Or what about creating it as a file based db, but on a ram disk, then copy to actual filesystem once created? On 3/08/2012 10:14 PM, Robin wrote: Hi, For those who are interested in my use case, you may read this part or skip it: I need to create a huge DB (300 mb right now, an

Re: Create a in-memory Database and save it to the filesystem

2012-08-03 Thread Ryan How
Can you do a script to, then create it again as a file based database off the script? On 3/08/2012 10:14 PM, Robin wrote: Hi, For those who are interested in my use case, you may read this part or skip it: I need to create a huge DB (300 mb right now, and this is only some t

Re: Changing port 9092 to a different on on H2 Embedded mode

2012-08-01 Thread Ryan How
You want to use tcpPort . I know it is in the docs, but I can't find where! On 1/08/2012 11:29 PM, Sanjeev Sharma wrote: Hi: I have a requirement to change the port on which H2 TCP starts from 9092 to a different port - is this possible. I see documentation on webPort - which does not look t

Re: It is possible to insert binary data in a script sql?

2012-07-26 Thread Ryan How
You could try a SCRIPT TO command on a database with binary data and see how it is represented in the script. On 26/07/2012 2:05 PM, Juan Pablo Gardella wrote: I 'm building some tests and I need to populate a table that have a binary data column. So I tried: insert into Archivo (id, file, fi

Re: Huge performance problem with simple query

2012-07-11 Thread Ryan How
Stab in the dark, but maybe analyze with a larger sample size? ANALYZE SAMPLE_SIZE 1000 Sorry, thomas and noel are much more experienced than me :) On 11/07/2012 4:29 PM, Bartosz Skorupa wrote: Yes, and for one query it is faster, but when i change numbers in WHERE it come back to long perfo

Re: Huge performance problem with simple query

2012-07-11 Thread Ryan How
1026) AND (LOGENTRY.CATEGORY = LOG_CATEGORIES.ID <http://LOG_CATEGORIES.ID>)) ORDER BY 2 NULLS LAST LIMIT 165 OFFSET 0 Pozdrawiam Bartosz Skorupa 2012/7/11 Ryan How mailto:r...@exemail.com.au>> Do you have an index on nanotime? If you run EXPLAIN on your quer

Re: Huge performance problem with simple query

2012-07-11 Thread Ryan How
Do you have an index on nanotime? If you run EXPLAIN on your query it can tell you if it is using an index or table scan. http://www.h2database.com/html/grammar.html?highlight=Explain&search=explain#explain On 11/07/2012 3:32 PM, Bartosz Skorupa wrote: I have a simple DB with table define

Re: Digest for h2-database@googlegroups.com - 2 Messages in 1 Topic

2012-06-10 Thread Ryan How
ary Group: http://groups.google.com/group/h2-database/topics * ODBC <#137d4c7db0cbe923_group_thread_0> [2 Updates] ODBC <http://groups.google.com/group/h2-database/t/68c28e62b0a22e24> Carlos Crosetti mailto:carlos.crose...@gmail.com>> Jun 09 01:13PM -0300 Is there a

Re: ODBC

2012-06-09 Thread Ryan How
syntax. There is no > word about fact that index can be crated on DESC column. I will see what I can do about updating the documentation, JdbcConnectionPool <http://groups.google.com/group/h2-database/t/d8230f16cec77920> Ryan How mailto:r...@exemail.com.au&g

Re: JdbcConnectionPool

2012-06-07 Thread Ryan How
e care of all that stuff for you. They are not as heavy as Hibernate, and take care of just the annoying details like making sure you close connections. -nate "The sky calls to us. If we do not destroy ourselves, we will one day venture to the stars." -- Carl Sagan On Tue, Jun 5,

JdbcConnectionPool

2012-06-05 Thread Ryan How
Hi, I was having a quick look through the source of JdbcConnectionPool, but I was unable to determine if connections are automatically returned to the pool if close is not called. So if I don't call close on the connection, and the thread with the connection ends, will the garbage collector

Re: Slow operations above 500MB?

2012-06-04 Thread Ryan How
In my web app with H2 it feels to be about twice as fast for me in embedded. But it really depends on the number of queries. I was a bit quick and dirty so have lots of small queries instead of doing it in a big batch. On 5/06/2012 3:31 AM, toolforger wrote: Ah, sweet. Sounds like H2 is good

Re: Accessing an H2.db file inside a jar?

2012-05-30 Thread Ryan How
an likely looking for a .zip file. I've tried changing it to "jdbc:h2:jar" and "jdbc:h2:file" but it gives me an exception saying that it could not load properties. Thanks for your help by the way. On May 30, 11:44 am, Ryan How wrote: I remember this coming up before a whil

Re: Accessing an H2.db file inside a jar?

2012-05-30 Thread Ryan How
java classes which make the connection will be in. On May 30, 10:04 am, Ryan How wrote: A jar is a zip file :) Do you mean access it via classpath rather than naming the zip/jar file? On 30/05/2012 10:44 PM, bee vo wrote: Hey, is there a way to make a connection to a db file that is i

Re: Accessing an H2.db file inside a jar?

2012-05-30 Thread Ryan How
A jar is a zip file :) Do you mean access it via classpath rather than naming the zip/jar file? On 30/05/2012 10:44 PM, bee vo wrote: Hey, is there a way to make a connection to a db file that is inside a jar? I know that H2 has a feature that allows connection to a db inside of zip file but ho

Re: Do I need to create an index on text columns when doing LIKE 'something%'?

2012-05-15 Thread Ryan How
Hi, I think you need to create it. You can always run EXPLAIN and see if the query is using an index or not. So if it isn't, then try creating one, then see if it uses it. It would work without the index, it would just be slower. http://www.h2database.com/html/grammar.html#explain On 15/

Re: Listening to changes in data from another process at a database level

2012-05-10 Thread Ryan How
with a query prioritiser :) Thanks On 11/05/2012 2:04 AM, Noel Grandin wrote: There are no built-in facilities, but you could hook a trigger into your own custom java method which could broadcast updates. On Thu, May 10, 2012 at 1:03 PM, Ryan How wrote: Hi, This is more of a theoretical quest

Listening to changes in data from another process at a database level

2012-05-10 Thread Ryan How
Hi, This is more of a theoretical question at the moment, but in say MS Access and FileMaker, if data is changed by another process when you are viewing it, it automatically updates in the view. Is there a way in H2 to register some kind of listener on a table, or on records on a table, to be

Re: Non Automatic Mixed mode

2012-05-07 Thread Ryan How
On second look, you don't by any chance have the database open in another process, eg the web console? On 8/05/2012 2:16 PM, Ryan How wrote: Yes it most definitely is. You need to access the database from the web application using the embedded mode. And then from the web application, sta

Re: Non Automatic Mixed mode

2012-05-07 Thread Ryan How
Yes it most definitely is. You need to access the database from the web application using the embedded mode. And then from the web application, start up a tcpserver. Then you can connect to the database using that TCP server. I'm not familiar with how you do it from the web.xml, I just usually

Re: Disk Growth

2012-04-11 Thread Ryan How
I don't know if it would suit your situation (and it isn't really answering your question, but I don't know the answer :), but you could run it from a zip file as read only? That should have a very small footprint... jdbc:h2:zip:/zipFileName!/fileName. Ryan On 12/04/2012 1:26 AM, Bob wrote:

Re: Advantage of one connection per thread

2012-04-03 Thread Ryan How
I'm no expert, but a connection per thread sounds right. Or even better, run a connection pool which will handle it all automatically. In most of my web apps (smaller ones), I run a connection per request (which is really per thread), and leave a control connection open for the entire applicati

Re: Can this be done better?

2012-03-07 Thread Ryan How
I think it is only a problem if you are having performance issues. In most of my programs there is usually a much more efficient way of doing things, but if it takes 5ms or 1ms it doesn't really make any difference compared to everything else. I would only start optimising if you are having iss

Re: Support for thread-pools (log/lock-threads)

2012-02-19 Thread Ryan How
Maybe the OS or something is smarter than it seems... I've had thousands of open threads and memory stays a lot lower than 1MB / thread. If it didn't my little laptop would chug! I just ran a test then... public static void main(String[] args) { for (int i = 0; i < 1000; i++) {

Re: Support for thread-pools (log/lock-threads)

2012-02-13 Thread Ryan How
Hi, Sorry this isn't answering your question... but I've worked on a project with thousands of threads and found it to not actually really cause any issues (Except for hitting the thread limit for a process). Does the large number of threads cause issues for you? I guess for large scalability

Re: Getting Birthday ?

2012-01-13 Thread Ryan How
tm.close(); } catch (SQLException ex) { Logger.getLogger(PersonsDAO.class.getName()).log(Level.SEVERE, null, ex); } return lista; } That's worked. there another way to do that ? thanks. On 13 jan, 10:58, Ryan How wrote: Do you want the date of their next bir

Re: Getting Birthday ?

2012-01-13 Thread Ryan How
Do you want the date of their next birthday? An example of the output you want would be helpful. On 13/01/2012 12:19 PM, the nigga wrote: Hello I have a field in my table persons: BORN DATE. how can I get a birthday of a person through a SELECT ? I am trying do this using Calendar,but not w

Re: Connect to a database via dynDns

2012-01-09 Thread Ryan How
You can't connect to an internal host using the external IP unless you have NAT reflection on your router. Some do and some don't. But what you can do is put a static entry for yourhost.dyndns.org in your routers DNS list and map it to the internal IP. So internally your clients will resolve t

<    1   2   3   >