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

Documentation.

上级 b903a314
...@@ -18,7 +18,9 @@ Change Log ...@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Using the java.sql.Blob or java.sql.Clob interfaces could throw the wrong <ul><li>Connection pool / DataSource: a NullPointerException was thrown when
using a database URL that doesn't start with "jdbc:h2:".
</li><li>Using the java.sql.Blob or java.sql.Clob interfaces could throw the wrong
exception after the object was closed. exception after the object was closed.
</li></ul> </li></ul>
......
...@@ -23,8 +23,6 @@ Frequently Asked Questions ...@@ -23,8 +23,6 @@ Frequently Asked Questions
Are there Known Bugs? When is the Next Release?</a><br /> Are there Known Bugs? When is the Next Release?</a><br />
<a href="#open_source"> <a href="#open_source">
Is this Database Engine Open Source?</a><br /> Is this Database Engine Open Source?</a><br />
<a href="#query_slow">
My Query is Slow</a><br />
<a href="#create_database"> <a href="#create_database">
How to Create a New Database?</a><br /> How to Create a New Database?</a><br />
<a href="#connect"> <a href="#connect">
...@@ -37,6 +35,10 @@ Frequently Asked Questions ...@@ -37,6 +35,10 @@ Frequently Asked Questions
Is it Reliable?</a><br /> Is it Reliable?</a><br />
<a href="#slow_open"> <a href="#slow_open">
Why is Opening my Database Slow?</a><br /> Why is Opening my Database Slow?</a><br />
<a href="#query_slow">
My Query is Slow</a><br />
<a href="#database_slow">
H2 is Very Slow</a><br />
<a href="#column_names_incorrect"> <a href="#column_names_incorrect">
Column Names are Incorrect?</a><br /> Column Names are Incorrect?</a><br />
<a href="#float_is_double"> <a href="#float_is_double">
...@@ -85,21 +87,6 @@ Yes. It is free to use and distribute, and the source code is included. ...@@ -85,21 +87,6 @@ Yes. It is free to use and distribute, and the source code is included.
See also under license. See also under license.
</p> </p>
<h3 id="query_slow">My Query is Slow</h3>
<p>
Slow <code>SELECT</code> (or <code>DELETE, UPDATE, MERGE</code>)
statement can have multiple reasons. Follow this checklist:
</p>
<ul>
<li>Run <code>ANALYZE</code> (see documentation for details).
</li><li>Run the query with <code>EXPLAIN</code> and check if indexes are used
(see documentation for details).
</li><li>If required, create additional indexes and try again using
<code>ANALYZE</code> and <code>EXPLAIN</code>.
</li><li>If it doesn't help please report the problem.
</li>
</ul>
<h3 id="create_database">How to Create a New Database?</h3> <h3 id="create_database">How to Create a New Database?</h3>
<p> <p>
By default, a new database is automatically created if it does not yet exist. By default, a new database is automatically created if it does not yet exist.
...@@ -193,6 +180,43 @@ In this case, use a backup of the database or the Recover tool. Please report su ...@@ -193,6 +180,43 @@ In this case, use a backup of the database or the Recover tool. Please report su
The plan is that the database automatically recovers in all situations. The plan is that the database automatically recovers in all situations.
</p> </p>
<h3 id="slow_open">Why is Opening my Database Slow?</h3>
<p>
To find out what the problem is, use the H2 Console and click on "Test Connection"
instead of "Login". After the "Login Successful" appears, click on it (it's a link).
This will list the top stack traces. Then either analyze this yourself, or
post those stack traces in the Google Group.
</p>
<p>
Other possible reasons are: the database is very big (many GB), or contains linked tables
that are slow to open.
</p>
<h3 id="query_slow">My Query is Slow</h3>
<p>
Slow <code>SELECT</code> (or <code>DELETE, UPDATE, MERGE</code>)
statement can have multiple reasons. Follow this checklist:
</p>
<ul>
<li>Run <code>ANALYZE</code> (see documentation for details).
</li><li>Run the query with <code>EXPLAIN</code> and check if indexes are used
(see documentation for details).
</li><li>If required, create additional indexes and try again using
<code>ANALYZE</code> and <code>EXPLAIN</code>.
</li><li>If it doesn't help please report the problem.
</li>
</ul>
<h3 id="database_slow">H2 is Very Slow</h3>
<p>
By default, H2 closes the database when the last connection is closed.
If your application closes the only connection after each operation,
the database is opened and closed a lot, which is quite slow.
There are multiple ways to solve this problem, see
<a href="performance.html#database_performance_tuning">Database Performance Tuning</a>.
</p>
<h3 id="column_names_incorrect">Column Names are Incorrect?</h3> <h3 id="column_names_incorrect">Column Names are Incorrect?</h3>
<p> <p>
For the query <code>SELECT ID AS X FROM TEST</code> the method For the query <code>SELECT ID AS X FROM TEST</code> the method
...@@ -226,18 +250,6 @@ See also ...@@ -226,18 +250,6 @@ See also
<a href="http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/mapping.html#1055162"> <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/mapping.html#1055162">
Mapping SQL and Java Types - 8.3.10 FLOAT</a>.</p> Mapping SQL and Java Types - 8.3.10 FLOAT</a>.</p>
<h3 id="slow_open">Why is Opening my Database Slow?</h3>
<p>
To find out what the problem is, use the H2 Console and click on "Test Connection"
instead of "Login". After the "Login Successful" appears, click on it (it's a link).
This will list the top stack traces. Then either analyze this yourself, or
post those stack traces in the Google Group.
</p>
<p>
Other possible reasons are: the database is very big (many GB), or contains linked tables
that are slow to open.
</p>
<h3 id="gcj">Is the GCJ Version Stable? Faster?</h3> <h3 id="gcj">Is the GCJ Version Stable? Faster?</h3>
<p> <p>
The GCJ version is not as stable as the Java version. The GCJ version is not as stable as the Java version.
......
...@@ -507,6 +507,9 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -507,6 +507,9 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Parameter data type is data type of other operand. Issue 205. </li><li>Parameter data type is data type of other operand. Issue 205.
</li><li>Some combinations of nested join with right outer join are not supported. </li><li>Some combinations of nested join with right outer join are not supported.
</li><li>DatabaseEventListener.openConnection(id) and closeConnection(id). </li><li>DatabaseEventListener.openConnection(id) and closeConnection(id).
</li><li>Listener or authentication module for new connections, or a way to restrict the number of different connections to a tcp server,
or to prevent to login with the same username and password from different IPs.
Possibly using the DatabaseEventListener API, or a new API.
</li><li>Compatibility for data type CHAR (Derby, HSQLDB). Issue 212. </li><li>Compatibility for data type CHAR (Derby, HSQLDB). Issue 212.
</li><li>Compatibility with MySQL TIMESTAMPDIFF. Issue 209. </li><li>Compatibility with MySQL TIMESTAMPDIFF. Issue 209.
</li><li>Optimizer: use a histogram of the data, specially for non-normal distributions. </li><li>Optimizer: use a histogram of the data, specially for non-normal distributions.
...@@ -527,9 +530,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -527,9 +530,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
disable autocommit for all connections. disable autocommit for all connections.
</li><li>Compatibility with MS Access: support "&amp;" to concatenate text. </li><li>Compatibility with MS Access: support "&amp;" to concatenate text.
</li><li>The BACKUP statement should not synchronize on the database, and therefore should not block other users. </li><li>The BACKUP statement should not synchronize on the database, and therefore should not block other users.
</li><li>Listener or authentication module for new connections, or a way to restrict the number of different connections to a tcp server,
or to prevent to login with the same username and password from different IPs.
Possibly using the DatabaseEventListener API, or a new API.
</li><li>Support ALTER TABLE ADD COLUMN IF NOT EXISTS. </li><li>Support ALTER TABLE ADD COLUMN IF NOT EXISTS.
</li><li>Document the database file format. </li><li>Document the database file format.
</li><li>Support reading LOBs. </li><li>Support reading LOBs.
...@@ -537,6 +537,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -537,6 +537,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
LOG=0, LOG=1, LOCK_MODE=0, disabling FILE_LOCK,... LOG=0, LOG=1, LOCK_MODE=0, disabling FILE_LOCK,...
</li><li>Allow to defragment at runtime (similar to SHUTDOWN DEFRAG) in a background thread. </li><li>Allow to defragment at runtime (similar to SHUTDOWN DEFRAG) in a background thread.
</li><li>Support for Thread.interrupt to cancel running statements. </li><li>Support for Thread.interrupt to cancel running statements.
</li><li>Oracle compatibility: support INSERT ALL.
</li></ul> </li></ul>
<h2>Not Planned</h2> <h2>Not Planned</h2>
......
...@@ -47,7 +47,7 @@ public class Driver implements java.sql.Driver { ...@@ -47,7 +47,7 @@ public class Driver implements java.sql.Driver {
* *
* @param url the database URL * @param url the database URL
* @param info the connection properties * @param info the connection properties
* @return the new connection * @return the new connection or null if the URL is not supported
*/ */
public Connection connect(String url, Properties info) throws SQLException { public Connection connect(String url, Properties info) throws SQLException {
try { try {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论