提交 08ef2638 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 dc5f9f44
...@@ -178,12 +178,13 @@ This database supports the following transaction isolation levels: ...@@ -178,12 +178,13 @@ This database supports the following transaction isolation levels:
<ul> <ul>
<li><b>Read Committed</b><br /> <li><b>Read Committed</b><br />
This is the default level. This is the default level.
Read locks are released immediately. Read locks are released immediately after executing the statement, but write locks are kept until the transaction commits.
Higher concurrency is possible when using this level.<br /> Higher concurrency is possible when using this level.<br />
To enable, execute the SQL statement <code>SET LOCK_MODE 3</code><br /> To enable, execute the SQL statement <code>SET LOCK_MODE 3</code><br />
or append <code>;LOCK_MODE=3</code> to the database URL: <code>jdbc:h2:~/test;LOCK_MODE=3</code> or append <code>;LOCK_MODE=3</code> to the database URL: <code>jdbc:h2:~/test;LOCK_MODE=3</code>
</li><li> </li><li>
<b>Serializable</b><br /> <b>Serializable</b><br />
Both read locks and write locks are kept until the transaction commits.
To enable, execute the SQL statement <code>SET LOCK_MODE 1</code><br /> To enable, execute the SQL statement <code>SET LOCK_MODE 1</code><br />
or append <code>;LOCK_MODE=1</code> to the database URL: <code>jdbc:h2:~/test;LOCK_MODE=1</code> or append <code>;LOCK_MODE=1</code> to the database URL: <code>jdbc:h2:~/test;LOCK_MODE=1</code>
</li><li><b>Read Uncommitted</b><br /> </li><li><b>Read Uncommitted</b><br />
...@@ -225,6 +226,7 @@ to write to a table (update or delete a row), an exclusive lock is required. To ...@@ -225,6 +226,7 @@ to write to a table (update or delete a row), an exclusive lock is required. To
exclusive lock, other connection must not have any locks on the object. After the exclusive lock, other connection must not have any locks on the object. After the
connection commits, all locks are released. connection commits, all locks are released.
This database keeps all locks in memory. This database keeps all locks in memory.
When releasing a lock, one of the waiting connections is picked at random.
</p> </p>
<h3>Lock Timeout</h3> <h3>Lock Timeout</h3>
......
...@@ -194,19 +194,6 @@ encrypted using AES-128 and XTEA encryption algorithms ...@@ -194,19 +194,6 @@ encrypted using AES-128 and XTEA encryption algorithms
<td class="compareN">No</td> <td class="compareN">No</td>
<td class="compareN">No</td> <td class="compareN">No</td>
</tr><tr> </tr><tr>
<td>Transaction Isolation</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
<td class="compareN">No</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
</tr><tr>
<td>Cost Based Optimizer</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
<td class="compareN">No</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
</tr><tr> </tr><tr>
<td>Explain Plan</td> <td>Explain Plan</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
...@@ -225,7 +212,7 @@ encrypted using AES-128 and XTEA encryption algorithms ...@@ -225,7 +212,7 @@ encrypted using AES-128 and XTEA encryption algorithms
<td>Encrypted Database</td> <td>Encrypted Database</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareN">No</td>
<td class="compareN">No</td> <td class="compareN">No</td>
</tr><tr> </tr><tr>
...@@ -253,7 +240,7 @@ encrypted using AES-128 and XTEA encryption algorithms ...@@ -253,7 +240,7 @@ encrypted using AES-128 and XTEA encryption algorithms
<td>User-Defined Datatypes</td> <td>User-Defined Datatypes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareN">No</td>
<td class="compareN">No</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
</tr><tr> </tr><tr>
...@@ -264,24 +251,24 @@ encrypted using AES-128 and XTEA encryption algorithms ...@@ -264,24 +251,24 @@ encrypted using AES-128 and XTEA encryption algorithms
<td class="compareN">Many</td> <td class="compareN">Many</td>
<td class="compareN">Many</td> <td class="compareN">Many</td>
</tr><tr> </tr><tr>
<td>Table Level Locking</td> <td>Row Level Locking</td>
<td class="compareY">Yes</td> <td class="compareY">Yes *9</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareY">Yes *9</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
</tr><tr> </tr><tr>
<td>Row Level Locking</td> <td>Multi Version Concurrency</td>
<td class="compareY">Yes *9</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareN">No</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td>
</tr><tr> </tr><tr>
<td>Multi Version Concurrency</td> <td>Multi-Threaded Statement Processing</td>
<td class="compareN">No *11</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No</td>
<td class="compareN">No</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
</tr><tr> </tr><tr>
...@@ -295,7 +282,7 @@ encrypted using AES-128 and XTEA encryption algorithms ...@@ -295,7 +282,7 @@ encrypted using AES-128 and XTEA encryption algorithms
<td>Updatable Result Sets</td> <td>Updatable Result Sets</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes *7</td> <td class="compareY">Yes *7</td>
<td class="compareN">No</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
</tr><tr> </tr><tr>
...@@ -323,7 +310,7 @@ encrypted using AES-128 and XTEA encryption algorithms ...@@ -323,7 +310,7 @@ encrypted using AES-128 and XTEA encryption algorithms
<td>Information Schema</td> <td>Information Schema</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No *8</td> <td class="compareN">No *8</td>
<td class="compareN">No *8</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
</tr><tr> </tr><tr>
...@@ -344,14 +331,14 @@ encrypted using AES-128 and XTEA encryption algorithms ...@@ -344,14 +331,14 @@ encrypted using AES-128 and XTEA encryption algorithms
<td>Custom Aggregate Functions</td> <td>Custom Aggregate Functions</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareN">No</td>
<td class="compareN">No</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
</tr><tr> </tr><tr>
<td>Footprint (jar/dll size)</td> <td>Footprint (jar/dll size)</td>
<td>~1 MB *5</td> <td>~1 MB *5</td>
<td>~2 MB</td> <td>~2 MB</td>
<td>~700 KB</td> <td>~1 MB</td>
<td>~4 MB</td> <td>~4 MB</td>
<td>~6 MB</td> <td>~6 MB</td>
</tr> </tr>
...@@ -365,7 +352,10 @@ encrypted using AES-128 and XTEA encryption algorithms ...@@ -365,7 +352,10 @@ encrypted using AES-128 and XTEA encryption algorithms
*6 PostgreSQL supports functional indexes.<br /> *6 PostgreSQL supports functional indexes.<br />
*7 Derby only supports updatable result sets if the query is not sorted.<br /> *7 Derby only supports updatable result sets if the query is not sorted.<br />
*8 Derby and HSQLDB don't support standard compliant information schema tables.<br /> *8 Derby and HSQLDB don't support standard compliant information schema tables.<br />
*9 H2 supports row level locks when using multi version concurrency. *9 When using MVCC (multi version concurrency).<br />
*10 Derby and HSQLDB
<a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29">don't hide hide data patterns well</a>.<br />
*11 The MULTI_THREADED option is not enabled by default, and not yet supported when using MVCC.
</p> </p>
<h3>Derby and HSQLDB</h3> <h3>Derby and HSQLDB</h3>
......
...@@ -103,24 +103,10 @@ Welcome to H2, the Java SQL database. The main features of H2 are: ...@@ -103,24 +103,10 @@ Welcome to H2, the Java SQL database. The main features of H2 are:
<td class="compareN">No</td> <td class="compareN">No</td>
<td class="compareN">No</td> <td class="compareN">No</td>
</tr><tr> </tr><tr>
<td>Transaction Isolation</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
<td class="compareN">No</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
</tr><tr>
<td>Cost Based Optimizer</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
<td class="compareN">No</td>
<td class="compareY">Yes</td>
<td class="compareY">Yes</td>
</tr><tr>
<td>Encrypted Database</td> <td>Encrypted Database</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareN">No</td>
<td class="compareN">No</td> <td class="compareN">No</td>
</tr><tr> </tr><tr>
...@@ -141,14 +127,14 @@ Welcome to H2, the Java SQL database. The main features of H2 are: ...@@ -141,14 +127,14 @@ Welcome to H2, the Java SQL database. The main features of H2 are:
<td>Multi Version Concurrency</td> <td>Multi Version Concurrency</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareN">No</td> <td class="compareN">No</td>
<td class="compareN">No</td> <td class="compareN">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
<td class="compareY">Yes</td> <td class="compareY">Yes</td>
</tr><tr> </tr><tr>
<td>Footprint (jar/dll size)</td> <td>Footprint (jar/dll size)</td>
<td>~1 MB</td> <td>~1 MB</td>
<td>~2 MB</td> <td>~2 MB</td>
<td>~600 KB</td> <td>~1 MB</td>
<td>~4 MB</td> <td>~4 MB</td>
<td>~6 MB</td> <td>~6 MB</td>
</tr> </tr>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论