Well, I found out it is because at opening it deletes temporary files: ValueLob.removeAllForTable() which takes up all the time. I have a lob field which apparently have resulted in 1559 folders and 269268 files. Recursing through the tree and doing a isDirectory() on each file takes a lot of time.
Any idea how I can reduce the number of files? Can I set MAX_LENGTH_INPLACE_LOB after the database has been created? Will it also change existing lob saved in files? Frank On Sep 18, 7:58 pm, Frank Mera <[email protected]> wrote: > I have a database on about 230 Mb, but it takes several minutes > opening the database. I tried adding a TRACE_LEVEL_SYSTEM_OUT=3 and > got the following loggings: > > /**/Connection conn0 = DriverManager.getConnection > ("jdbc:h2:yahooDB;TRACE_LEVEL_SYSTEM_OUT=3", "", ""); > 09-18 19:34:18 jdbc[2]: > /**/conn0.getAutoCommit(); > 09-18 19:34:18 jdbc[2]: > /*SQL #:1*/CALL AUTOCOMMIT(); > 09-18 19:34:18 jdbc[2]: > /**/conn0.isClosed(); > 09-18 19:34:18 jdbc[2]: > /**/conn0.getAutoCommit(); > 09-18 19:34:18 jdbc[2]: > /*SQL #:1*/CALL AUTOCOMMIT(); > 09-18 19:34:18 jdbc[2]: > /**/conn0.clearWarnings(); > 09-18 19:34:18 jdbc[2]: > /**/conn0.getAutoCommit(); > 09-18 19:34:18 jdbc[2]: > /*SQL #:1*/CALL AUTOCOMMIT(); > 09-18 19:34:18 jdbc[2]: > /**/conn0.close(); > 09-18 19:34:18 jdbc[2]: > /*SQL */ROLLBACK; > 09-18 19:34:18 session: disconnecting #2 > 09-18 19:34:18 database: closing C:\pr\projekter\java\getYahooGroups > \yahooDB > 09-18 19:34:18 index: Index PUBLIC.PRIMARY_KEY_2 head consistent=true > 09-18 19:34:18 index: Index PUBLIC.PRIMARY_KEY_6 head consistent=true > 09-18 19:34:18 index: Index PUBLIC.FK38EB0007A3CDD464_INDEX_1 head > consistent=true > 09-18 19:34:18 index: Index PUBLIC.MESSAGE_ID head consistent=true > 09-18 19:34:18 index: Index PUBLIC.GROUP_MESSAGE_ID head > consistent=true > 09-18 19:34:18 index: Index PUBLIC.RECIPE_STATUS head consistent=true > 09-18 19:34:18 index: Index PUBLIC.PRIMARY_KEY_4 head consistent=true > 09-18 19:34:18 index: Index PUBLIC.PRIMARY_KEY_8 head consistent=true > 09-18 19:34:18 lock: 1 exclusive write lock requesting for SYS > 09-18 19:34:18 lock: 1 exclusive write lock added for SYS > 09-18 19:34:18 lock: 1 exclusive write lock requesting for SYS > 09-18 19:34:18 lock: 1 exclusive write lock unlock SYS > 09-18 19:34:18 lock: 1 exclusive write lock requesting for SYS > 09-18 19:34:18 lock: 1 exclusive write lock added for SYS > 09-18 19:34:18 lock: 1 exclusive write lock requesting for SYS > 09-18 19:34:18 lock: 1 exclusive write lock unlock SYS > 09-18 19:34:18 lock: 1 exclusive write lock requesting for SYS > 09-18 19:34:18 lock: 1 exclusive write lock added for SYS > 09-18 19:34:18 lock: 1 exclusive write lock requesting for SYS > 09-18 19:34:18 lock: 1 exclusive write lock unlock SYS > 09-18 19:37:35 fileLock: load {method=file, > id=123ce37f9344eb4f7bb63c5ea2340655794eac72cc4} > 09-18 19:37:35 database: closed > 09-18 19:37:35 session: disconnected #2 > ...... > > I don't really understand what it is doing for those three minutes? As > far as I could check there were no applications having a lock on any > of the files before the application started. Anyone knows what is > happening? > > Frank --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
