Re: RuntimeException in a Select max() query
Turn off MVCC. Thomas, perhaps the MVCC option should be disabled, since it keeps causing problems ? On 2012-10-01 10:02, Ignasi Marimon-Clos i Sunyol wrote: -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
Identity Column Jumps Randomly
Hi, H2 is very fast, and really fantastic to work. Recently, I migrated to 1.3.168 and changed all my auto_increment columns to Identity. I am using scope_identity() to get the primary key created and also have trigger for that table. While inserting, many times, the identity columns jumps by 32 and random sometimes. Please help. Jashveer Anand -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/oueR3k9SNpgJ. To post to this group, send email to h2-database@googlegroups.com. To unsubscribe from this group, send email to h2-database+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
H2 In-Memory Database Cache and H2 Performance vs. MySQL Performance
Hello, I'm using a H2 In-Memory Database with 250.000 DataSets (Rows of data). 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. A other Query need the first time 251ms and after that 6ms per run. The only explanation I have is the using of a cache, but in the documentation, they say, in-memory database have no cache or the say, no effect by in-memory. The other point is, why is a H2 in-memory database only the first time I'm running a sql-select faster then a MySQL-Database? I thougt in-memory is a lot of times faster then a disk-based database. -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/bfDPwhNWD4QJ. To post to this group, send email to h2-database@googlegroups.com. To unsubscribe from this group, send email to h2-database+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
IDENTITY COLUMN JUMPING BY 32
Hi all, H2 is very fast and fantastic to work. I recently upgraded H2 1.3.168. And converted all my auto_increment columns to Identity(). I have tables with identity column and I am using scope_identity() to get the value, since I am using triggers. Some occasions, the identity column generating is incrementing by 32 and randomly sometimes. Can anyone help me solve this issue. ? Advance thanks and regards, Anand Jashveer -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/EcusiDoq3y0J. To post to this group, send email to h2-database@googlegroups.com. To unsubscribe from this group, send email to h2-database+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
Re: IDENTITY COLUMN JUMPING BY 32
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 sure it's come up on the forums a few times. If it isn't between closing and opening the database, I'm not sure! :) Thanks, Ryan On 2/10/2012 3:11 PM, Jashveer Anand wrote: Hi all, H2 is very fast and fantastic to work. I recently upgraded H2 1.3.168. And converted all my auto_increment columns to Identity(). I have tables with identity column and I am using scope_identity() to get the value, since I am using triggers. Some occasions, the identity column generating is incrementing by 32 and randomly sometimes. Can anyone help me solve this issue. ? Advance thanks and regards, Anand Jashveer -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/EcusiDoq3y0J. To post to this group, send email to h2-database@googlegroups.com. To unsubscribe from this group, send email to h2-database+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en. -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
Re: H2 In-Memory Database Cache and H2 Performance vs. MySQL Performance
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 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
Using OR in where clause does not use index
If column a is index and running a query of SELECT * FROM tableFoo WHERE a = 'value' OR a LIKE 'value2' does not use the index on a. I also noticed the following query does not use an index SELECT * FROM tableFoo WHERE a = 'value' OR 1=1 This may be by design but probably should be documented somewhere. -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/GjKh5-2c-H4J. To post to this group, send email to h2-database@googlegroups.com. To unsubscribe from this group, send email to h2-database+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
Re: closing old connections from h2 console
Thomas, Thanks for the feedback... -Adam On Sunday, September 30, 2012 12:47:35 PM UTC-4, Thomas Mueller wrote: Hi, The db_close_delay is a delay and should do what you are looking for. For example db_close_delay=10 will close the database if there are no open connections for 10 seconds. See also http://h2database.com/html/grammar.html?highlight=DB_CLOSE_DELAYsearch=db_close#set_db_close_delay Regards, Thomas On Thu, Sep 27, 2012 at 3:28 PM, Adam McMahon ad...@cs.miami.edujavascript: wrote: Hi, I am using H2 embedded in a web app with db_close_delay=-1. The code in my app closes connections fine. However, on occasion we use the h2 web console to manage things. Since it is in a web browser, on occasion we close the browser while forgetting to hit the disconnect button (I know, human error... but we are used to simply closing browsers when we are done with them). This leaves a few connections that seem to stick around for a while. Is there a way I can run either a function or sql command to clean up connections that have been around for a period of time? Another possible idea is to add an onUnload event to the console html that send a quick ping to servlet to close the connection. I might just add this if there is not a good solution. -Adam -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/1_xsS7F2vqkJ. To post to this group, send email to h2-da...@googlegroups.comjavascript: . To unsubscribe from this group, send email to h2-database...@googlegroups.com javascript:. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en. -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/r2ZPLYWGnxQJ. To post to this group, send email to h2-database@googlegroups.com. To unsubscribe from this group, send email to h2-database+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.