提交 c7038f81 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 d00707ae
...@@ -18,7 +18,15 @@ Change Log ...@@ -18,7 +18,15 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>- <ul><li>H2 Console: command line settings are now longer stored in the properties file.
They are now only used for the current process, except if they are explicitly saved.
</li><li>Cache: support for a second level soft-references cache.
To enable it, append ;CACHE_TYPE=SOFT_LRU (or SOFT_TQ) to the database URL, or
set the system property h2.cacheTypeDefault to "SOFT_LRU" / "SOFT_TQ".
Enabling the second level cache reduces performance for
small databases, but speeds up large databases. It makes sense to use it
if the available memory size is unknown. Thanks a lot to Jan Kotek!
</li><li>
</li></ul> </li></ul>
<h2>Version 1.1.112 (2009-05-01)</h2> <h2>Version 1.1.112 (2009-05-01)</h2>
......
...@@ -38,7 +38,7 @@ Downloads ...@@ -38,7 +38,7 @@ Downloads
<p> <p>
<a href="http://repo2.maven.org/maven2/com/h2database/h2/${version}/h2-${version}.jar">Maven.org</a><br /> <a href="http://repo2.maven.org/maven2/com/h2database/h2/${version}/h2-${version}.jar">Maven.org</a><br />
<a href="http://hsql.sourceforge.net/m2-repo/com/h2database/h2/${version}/h2-${version}.jar">Sourceforge.net</a><br /> <a href="http://hsql.sourceforge.net/m2-repo/com/h2database/h2/${version}/h2-${version}.jar">Sourceforge.net</a><br />
<a href="http://www.h2database.com/automated/h2-latest.jar"">Latest Automated Build (not released)</a> <a href="http://www.h2database.com/automated/h2-latest.jar">Latest Automated Build (not released)</a>
</p> </p>
<h3>Subversion Source Repository</h3> <h3>Subversion Source Repository</h3>
......
...@@ -1661,13 +1661,17 @@ CACHE_SIZE. This setting can be set in the database connection URL ...@@ -1661,13 +1661,17 @@ CACHE_SIZE. This setting can be set in the database connection URL
SET CACHE_SIZE size. SET CACHE_SIZE size.
</p><p> </p><p>
This database supports two cache page replacement algorithms: LRU (the default) and This database supports two cache page replacement algorithms: LRU (the default) and
2Q. For LRU, the pages that were least frequently used are removed from the TQ. For LRU, the pages that were least frequently used are removed from the
cache if it becomes full. The 2Q algorithm is a bit more complicated: basically two cache if it becomes full. The TQ (Two Queue, also called 2Q) algorithm is a bit more complicated: basically two
queues are used. The 2Q algorithm is more resistant to table scans, however the overhead queues are used. It is more resistant to table scans, however the overhead
is a bit higher compared to the LRU. To use the cache algorithm 2Q, use a database URL is a bit higher compared to the LRU. To use the cache algorithm TQ, use a database URL
of the form jdbc:h2:~/test;CACHE_TYPE=TQ. The cache algorithm cannot be changed of the form jdbc:h2:~/test;CACHE_TYPE=TQ. The cache algorithm cannot be changed
once the database is open. once the database is open.
</p><p> </p><p>
Also supported is a second level soft reference cache. Rows in this cache are only garbage collected
on low memory. By default the second level cache is disabled. To enable it,
use the prefix SOFT_. Example: jdbc:h2:~/test;CACHE_TYPE=SOFT_LRU .
</p><p>
To get information about page reads and writes, and the current caching algorithm in use, To get information about page reads and writes, and the current caching algorithm in use,
call SELECT * FROM INFORMATION_SCHEMA.SETTINGS. The number of pages read / written call SELECT * FROM INFORMATION_SCHEMA.SETTINGS. The number of pages read / written
is listed for the data and index file. is listed for the data and index file.
......
...@@ -451,4 +451,10 @@ See <code>src/test/org/h2/samples/optimizations.sql</code> for a few examples of ...@@ -451,4 +451,10 @@ See <code>src/test/org/h2/samples/optimizations.sql</code> for a few examples of
that benefit from special optimizations built into the database. that benefit from special optimizations built into the database.
</p> </p>
<h3>Cache Size and Type</h3>
<p>
By default the cache size of H2 is quite small. Consider using a larger cache size, or enable
the second level soft reference cache. See also <a href="features.html#cache_settings">Cache Settings</a>.
</p>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
...@@ -197,7 +197,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -197,7 +197,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Feature matrix like in <a href="http://www.inetsoftware.de/products/jdbc/mssql/features/default.asp">i-net software</a>. </li><li>Feature matrix like in <a href="http://www.inetsoftware.de/products/jdbc/mssql/features/default.asp">i-net software</a>.
</li><li>Updatable result set on table without primary key or unique index </li><li>Updatable result set on table without primary key or unique index
</li><li>Use LinkedList instead of ArrayList where applicable </li><li>Use LinkedList instead of ArrayList where applicable
</li><li>Optimizer: use an index for IS NULL and IS NOT NULL (including linked tables). </li><li>Optimizer: use an index for IS NULL and IS NOT NULL (including linked tables).
ID IS NOT NULL could be converted to ID >= Integer.MIN_VALUE. ID IS NOT NULL could be converted to ID >= Integer.MIN_VALUE.
</li><li>Support % operator (modulo) </li><li>Support % operator (modulo)
</li><li>Support 1+'2'=3, '1'+'2'='12' (MS SQL Server compatibility) </li><li>Support 1+'2'=3, '1'+'2'='12' (MS SQL Server compatibility)
......
...@@ -86,10 +86,10 @@ li { ...@@ -86,10 +86,10 @@ li {
<div style="float:left; margin:5px; width:320px;"> <div style="float:left; margin:5px; width:320px;">
<h2>Using H2</h2> <h2>Using H2</h2>
<ul><li>Download the <ul><li>Download the
<a href="http://repo1.maven.org/maven2/com/h2database/h2/1.1.111/h2-1.1.111.jar">jar file</a>, <a href="http://repo1.maven.org/maven2/com/h2database/h2/1.1.111/h2-1.1.111.jar">jar file</a>,
<a href="http://www.h2database.com/h2-setup-2009-04-10.exe">Windows installer</a>, or <a href="http://www.h2database.com/h2-setup-2009-04-10.exe">Windows installer</a>, or
<a href="http://www.h2database.com/h2-2009-04-10.zip">zip file</a>. <a href="http://www.h2database.com/h2-2009-04-10.zip">zip file</a>.
</li><li>To start the H2 Console tool, double click the jar file, or run <code>java -jar h2*.jar</code>, <code>h2.bat</code> or <code>h2.sh</code>. </li><li>To start the H2 Console tool, double click the jar file, or run <code>java -jar h2*.jar</code>, <code>h2.bat</code> or <code>h2.sh</code>.
</li><li>A new database is automatically created if it does not yet exist. </li><li>A new database is automatically created if it does not yet exist.
</li><li>Closing the last connection closes a database. </li><li>Closing the last connection closes a database.
...@@ -114,7 +114,7 @@ li { ...@@ -114,7 +114,7 @@ li {
<b>Settings</b><br /> <b>Settings</b><br />
<code>jdbc:h2:..;MODE=MySQL</code> compatibility (or HSQLDB,...)<br /> <code>jdbc:h2:..;MODE=MySQL</code> compatibility (or HSQLDB,...)<br />
<code>jdbc:h2:..;TRACE_LEVEL_FILE=3</code> log to .trace.db<br /> <code>jdbc:h2:..;TRACE_LEVEL_FILE=3</code> log to .trace.db<br />
<p> </p>
<h2>Documentation</h2> <h2>Documentation</h2>
Reference: Reference:
...@@ -131,7 +131,7 @@ Features: ...@@ -131,7 +131,7 @@ Features:
<a href="http://www.h2database.com/html/datatypes.html">(in a zip or jar file)</a>, <a href="http://www.h2database.com/html/datatypes.html">(in a zip or jar file)</a>,
<a href="http://www.h2database.com/html/datatypes.html">CSV files</a>, <a href="http://www.h2database.com/html/datatypes.html">CSV files</a>,
<br /> <br />
</div> </div>
<div style="float:right; padding:5px; width:320px;"> <div style="float:right; padding:5px; width:320px;">
...@@ -139,7 +139,7 @@ Features: ...@@ -139,7 +139,7 @@ Features:
<pre> <pre>
Class.forName("org.h2.Driver"); Class.forName("org.h2.Driver");
Connection conn = DriverManager. Connection conn = DriverManager.
getConnection("jdbc:h2:~/test"); getConnection("jdbc:h2:~/test");
conn.close(); conn.close();
</pre> </pre>
...@@ -147,11 +147,11 @@ conn.close(); ...@@ -147,11 +147,11 @@ conn.close();
<pre> <pre>
import org.h2.jdbcx.JdbcConnectionPool; import org.h2.jdbcx.JdbcConnectionPool;
DataSource cp = JdbcConnectionPool. DataSource cp = JdbcConnectionPool.
create("jdbc:h2:~/test"); create("jdbc:h2:~/test");
Connection conn = cp.getConnection(); Connection conn = cp.getConnection();
conn.close(); cp.dispose(); conn.close(); cp.dispose();
</pre> </pre>
<h2>Start a Server</h2> <h2>Start a Server</h2>
<pre> <pre>
java -cp h2*.jar org.h2.tools.Server java -cp h2*.jar org.h2.tools.Server
...@@ -161,7 +161,7 @@ java -cp h2*.jar org.h2.tools.Server ...@@ -161,7 +161,7 @@ java -cp h2*.jar org.h2.tools.Server
In the file hibernate.cfg.xml, set: In the file hibernate.cfg.xml, set:
<pre> <pre>
&lt;property name="dialect"&gt; &lt;property name="dialect"&gt;
org.hibernate.dialect.H2Dialect org.hibernate.dialect.H2Dialect
&lt;/property&gt; &lt;/property&gt;
</pre> </pre>
As an alternative, use the HSQLDialect. As an alternative, use the HSQLDialect.
......
...@@ -588,4 +588,4 @@ animate scaladoc models disadvantages vladykin sergi trims requesting ...@@ -588,4 +588,4 @@ animate scaladoc models disadvantages vladykin sergi trims requesting
handing bonita placed euros embeds reliability singular unregister quotas handing bonita placed euros embeds reliability singular unregister quotas
overall httpdocs tigris eclemma separates underscore yajsw she her truncating overall httpdocs tigris eclemma separates underscore yajsw she her truncating
relocating smtps smtp osde joist catching guesses delimiters shortlist sheet relocating smtps smtp osde joist catching guesses delimiters shortlist sheet
rowspan cheat rowspan cheat partitioning datepart
\ No newline at end of file \ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论