Hi Christian, I agree on the fact that the connection of new client causes the modification and this is fine.
But it seems to me that also "select" queries cause the file modification. On my windows (and also on SunOs), the test case is running. Then I run the h2shell tool, when it connects, the file is modified and also every time I run a query (on table tableB). Best, Sylvain, On Jul 9, 2:31 pm, Christian Peter <[email protected]> wrote: > Hi Sylvain, > > thank you for the test case. Its not the select that causes the > modification, it's the connection from a new client. I'm sorry this is > currently by design. The SERIALIZED mode was never meant to be equal > in performance, so I think thats Ok. > > Maybe this changes in the future, but currently we don't plan to > improve that area. > > Regards > > Christian > > On Jul 8, 3:31 pm, Sylvain Archenault <[email protected]> wrote: > > > > > > > > > Hi Christian, > > > Thank you for your answer, I will use for now on the AUTO_SERVER mode. > > > I wrote a quick class to show the initial problem. The class will open > > the file in SERIALIZED mode and run a select query every second and > > will print the time taken by the executeQuery method. The output looks > > like this: > > > 9:22:14 AM Database last modified: 9:22:14 AM > > 9:22:14 AM Select query: 31 > > 9:22:15 AM Database last modified: 9:22:14 AM > > 9:22:15 AM Select query: 0 > > 9:22:16 AM Select query: 0 > > 9:22:17 AM Select query: 0 > > /*...*/ > > > Now I open a H2 shell: > > C:\Eclipse\bug h2>java -cp *.jar org.h2.tools.Shell -url > > "jdbc:h2:test;FILE_LOCK=SERIALIZED" -user sa > > > As soon as I run this command, the java program outputs something like : > > 9:25:10 AM Database last modified: 9:25:10 AM > > 9:25:10 AM Select query: 1032 > > 9:25:12 AM Database last modified: 9:25:11 AM > > 9:25:12 AM Select query: 0 > > 9:25:13 AM Select query: 0 > > > If in the shell, I run "select * from tableB;", you will also see an > > initial delay in the java output. > > > Let me know if you have any questions. > > > Sylvain > > > file_lock_serialized.zip > > 1KViewDownload -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
