Hi,

> It takes very long time to make an initial connection to the database
> after our application gets improperly shutdown (e.g. power
> disconnected). We use H2 in embedded mode, and the database size is
> about 40 MB.

How long is "very long"?

Usually small databases like that start quickly, even when not shut
down correctly. For larger databases it helps to use SET LOG 2, see
also http://www.h2database.com/html/grammar.html#setlog

But in your case (40 MB) this shouldn't be required. What database
URL, operating system, virtual machine (brand and version), and file
system do you use? How much memory do you have and how much do you
allocate to the JVM (the default should be fine... just to make sure)?

Could you send the list of files (file name and file sizes)?

Regards,
Thomas



>
> [1] java/io/RandomAccessFile.read([BII)I (pc 4), pc = 4
> [2] java/io/RandomAccessFile.readFully([BII)V (pc 35), pc = 35
> [3] org/h2/store/FileStore.readFully([BII)V (FileStore:280), pc = 97
> [4] org/h2/store/DiskFile.getRecord(Lorg/h2/engine/Session;ILorg/h2/
> store/RecordReader;I)Lorg/h2/store/Record; (DiskFile:577), pc = 91
> [5] org/h2/store/Storage.getRecord(Lorg/h2/engine/Session;I)Lorg/h2/
> store/Record; (Storage:94), pc = 17
> [6] org/h2/index/ScanIndex.getNextRow(Lorg/h2/engine/Session;Lorg/h2/
> result/Row;)Lorg/h2/result/Row; (ScanIndex:258), pc = 82
> [7] org/h2/index/ScanCursor.next()Z (ScanCursor:71), pc = 170
> [8] org/h2/table/TableData.addIndex(Lorg/h2/engine/Session;Ljava/lang/
> String;I[Lorg/h2/table/IndexColumn;Lorg/h2/index/IndexType;ILjava/lang/
> String;)Lorg/h2/index/Index; (TableData:189), pc = 240
> [9] org/h2/command/ddl/CreateIndex.update()I (CreateIndex:90), pc =
> 250
> [10] org/h2/engine/MetaRecord.execute(Lorg/h2/engine/Database;Lorg/h2/
> engine/Session;Lorg/h2/api/DatabaseEventListener;)V (MetaRecord:85),
> pc = 33
> [11] org/h2/engine/Database.open(II)V (Database:600), pc = 1071
> [12] org/h2/engine/Database.<init>(Ljava/lang/String;Lorg/h2/engine/
> ConnectionInfo;Ljava/lang/String;)V (Database:213), pc = 589
> [13] org/h2/engine/Engine.openSession(Lorg/h2/engine/
> ConnectionInfo;ZLjava/lang/String;)Lorg/h2/engine/Session; (Engine:
> 56), pc = 75
> [14] org/h2/engine/Engine.openSession(Lorg/h2/engine/
> ConnectionInfo;)Lorg/h2/engine/Session; (Engine:125), pc = 33
> [15] org/h2/engine/Engine.getSession(Lorg/h2/engine/
> ConnectionInfo;)Lorg/h2/engine/Session; (Engine:108), pc = 5
> [16] org/h2/engine/Session.createSession(Lorg/h2/engine/
> ConnectionInfo;)Lorg/h2/engine/SessionInterface; (Session:242), pc = 7
>
> Is there anything that we can do to speed up the inital connect? Will
> it help if we perform frequent checkpoints?
>
> Any help is most appreciated. Thank you,
> - G
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to