Re: [h2] Move database files after shutdown
Hi Ryan, Thanks for the answer. It is helpful to have confirmation that it can be done normally. Pretty sure there are no open connections as I have been counting them in and out (as they open/close), and I don't have the close delay set (and call shutdown in any case). I guess I need to start from the simplest possible case and get that working first. I have had other problems with deleting files from java on windows 7. - mike On Mon, Nov 11, 2013 at 5:16 AM, Ryan How r...@exemail.com.au wrote: The database will close when all connections to it are closed. So you must still have some connections open (Are you using a connection pool??) Also see http://h2database.com/html/grammar.html#set_db_close_delay Is there still the lock file present?. If that is still present then there is an open connection somewhere I close and open my databases all the time from the same JVM and copy them around, so it does work. On 11/11/2013 8:13 AM, Mike Goodwin wrote: Hi, I have found I am unable to move the database directory after a shutdown. I have tried waiting, gc(), calling for a shutdown (using the SHUTDOWN sql command). I have made sure there are no more connections open. Is there any expectation that it should be possible to close a database after shutting it down? Has anyone succeeded in doing so? - mike -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
Re: [h2] H2 database on multiple threads/cores
Noel, As always, thanks for your insights. It is good to know that H2 at its cores is single threaded while at the same time multithreaded at outer layers. , this will help me as I think about my design. SSD is a good option, looking to use Digital Ocean https://www.digitalocean.com/. Good SSD, but it only scales CPU via more cores not time slices (as opposed to http://www.linode.com) I have a hunch this mutli core scaling is not the best option for H2. But overall seems like nice service, and my hunches are often times wrong :) -Adam On Sunday, November 10, 2013 4:16:28 AM UTC-5, Noel Grandin wrote: The short answer is that it's complicated. You're probably better off creating some performance tests for your application and testing them out on the various options. Since the answers will vary depending on how your application uses the DB. For database applications I would recommend you pick the provider that supplies SSD storage. The longer answer is that H2 is composed of multiple layers. The lowest layer is single-threaded, but the layers and caches above that are multi-threaded, and since a lot of queries spend a lot of time processing data, rather than reading/writing to the disk, we actually get a fair amount of parallelism out of our architecture. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
Re: [h2] Move database files after shutdown
Do you have any backup software running? On occasion I get backup software locking files while it backs them up and it stops me deleting the file. And I've had anti-virus do the same, but that was mainly with zip files... On 11/11/2013 8:21 PM, Mike Goodwin wrote: Hi Ryan, Thanks for the answer. It is helpful to have confirmation that it can be done normally. Pretty sure there are no open connections as I have been counting them in and out (as they open/close), and I don't have the close delay set (and call shutdown in any case). I guess I need to start from the simplest possible case and get that working first. I have had other problems with deleting files from java on windows 7. - mike On Mon, Nov 11, 2013 at 5:16 AM, Ryan How r...@exemail.com.au mailto:r...@exemail.com.au wrote: The database will close when all connections to it are closed. So you must still have some connections open (Are you using a connection pool??) Also see http://h2database.com/html/grammar.html#set_db_close_delay Is there still the lock file present?. If that is still present then there is an open connection somewhere I close and open my databases all the time from the same JVM and copy them around, so it does work. On 11/11/2013 8:13 AM, Mike Goodwin wrote: Hi, I have found I am unable to move the database directory after a shutdown. I have tried waiting, gc(), calling for a shutdown (using the SHUTDOWN sql command). I have made sure there are no more connections open. Is there any expectation that it should be possible to close a database after shutting it down? Has anyone succeeded in doing so? - mike -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com mailto:h2-database%2bunsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com mailto:h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com mailto:h2-database%2bunsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com mailto:h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.