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

--no commit message

--no commit message
上级 d00707ae
......@@ -18,7 +18,15 @@ Change Log
<h1>Change Log</h1>
<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>
<h2>Version 1.1.112 (2009-05-01)</h2>
......
......@@ -38,7 +38,7 @@ Downloads
<p>
<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://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>
<h3>Subversion Source Repository</h3>
......
......@@ -1661,13 +1661,17 @@ CACHE_SIZE. This setting can be set in the database connection URL
SET CACHE_SIZE size.
</p><p>
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
cache if it becomes full. The 2Q algorithm is a bit more complicated: basically two
queues are used. The 2Q algorithm 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
TQ. For LRU, the pages that were least frequently used are removed from the
cache if it becomes full. The TQ (Two Queue, also called 2Q) algorithm is a bit more complicated: basically two
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 TQ, use a database URL
of the form jdbc:h2:~/test;CACHE_TYPE=TQ. The cache algorithm cannot be changed
once the database is open.
</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,
call SELECT * FROM INFORMATION_SCHEMA.SETTINGS. The number of pages read / written
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
that benefit from special optimizations built into the database.
</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>
......@@ -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>Updatable result set on table without primary key or unique index
</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.
</li><li>Support % operator (modulo)
</li><li>Support 1+'2'=3, '1'+'2'='12' (MS SQL Server compatibility)
......
......@@ -86,10 +86,10 @@ li {
<div style="float:left; margin:5px; width:320px;">
<h2>Using H2</h2>
<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://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>.
<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://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>.
</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>Closing the last connection closes a database.
......@@ -114,7 +114,7 @@ li {
<b>Settings</b><br />
<code>jdbc:h2:..;MODE=MySQL</code> compatibility (or HSQLDB,...)<br />
<code>jdbc:h2:..;TRACE_LEVEL_FILE=3</code> log to .trace.db<br />
<p>
</p>
<h2>Documentation</h2>
Reference:
......@@ -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">CSV files</a>,
<br />
</div>
<div style="float:right; padding:5px; width:320px;">
......@@ -139,7 +139,7 @@ Features:
<pre>
Class.forName("org.h2.Driver");
Connection conn = DriverManager.
getConnection("jdbc:h2:~/test");
getConnection("jdbc:h2:~/test");
conn.close();
</pre>
......@@ -147,11 +147,11 @@ conn.close();
<pre>
import org.h2.jdbcx.JdbcConnectionPool;
DataSource cp = JdbcConnectionPool.
create("jdbc:h2:~/test");
create("jdbc:h2:~/test");
Connection conn = cp.getConnection();
conn.close(); cp.dispose();
</pre>
<h2>Start a Server</h2>
<pre>
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:
<pre>
&lt;property name="dialect"&gt;
org.hibernate.dialect.H2Dialect
org.hibernate.dialect.H2Dialect
&lt;/property&gt;
</pre>
As an alternative, use the HSQLDialect.
......
......@@ -588,4 +588,4 @@ animate scaladoc models disadvantages vladykin sergi trims requesting
handing bonita placed euros embeds reliability singular unregister quotas
overall httpdocs tigris eclemma separates underscore yajsw she her truncating
relocating smtps smtp osde joist catching guesses delimiters shortlist sheet
rowspan cheat
\ No newline at end of file
rowspan cheat partitioning datepart
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论