faq.html 6.5 KB
Newer Older
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 3
<!--
Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
4 5
Initial Developer: H2 Group
-->
6 7
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
8
Frequently Asked Questions
9
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
10 11 12 13 14 15
<script type="text/javascript" src="navigation.js"></script>
</head><body onload="frameMe();">
<table class="content"><tr class="content"><td class="content"><div class="contentDiv">

<h1>Frequently Asked Questions</h1>

16
<a href="#known_bugs">
17
    Are there Known Bugs? When is the Next Release?</a><br />
18 19 20
<a href="#open_source">
    Is this Database Engine Open Source?</a><br />
<a href="#query_slow">
21
    My Query is Slow</a><br />
22 23 24 25 26 27 28
<a href="#create_database">
    How to Create a New Database?</a><br />
<a href="#connect">
    How to Connect to a Database?</a><br />
<a href="#database_files">
    Where are the Database Files Stored?</a><br />
<a href="#size_limit">
29
    What is the Size Limit (Maximum Size) of a Database?</a><br />
30 31 32
<a href="#reliable">
    Is it Reliable?</a><br />
<a href="#gcj">
33
    Is the GCJ Version Stable? Faster?</a><br />
34 35
<a href="#translate">
    How to Translate this Project?</a><br />
36 37

<br /><a name="known_bugs"></a>
38
<h3>Are there Known Bugs? When is the Next Release?</h3>
39
<p>
40
Usually, bugs get fixes as they are found. There is a release every few weeks.
41
Here is the list of known and confirmed issues:
42
</p>
43
<ul>
44 45
<li>Some problems have been found with right outer join. Internally, it is converted to left outer join, which
    does not always produce the same results as other databases when used in combination with other joins.
46
</li></ul>
47

48
<br /><a name="open_source"></a>
49
<h3>Is this Database Engine Open Source?</h3>
50
<p>
51 52
Yes. It is free to use and distribute, and the source code is included.
See also under license.
53
</p>
54

55
<br /><a name="query_slow"></a>
56
<h3>My Query is Slow</h3>
57 58 59 60 61 62 63
<p>
Slow SELECT (or DELETE, UPDATE, MERGE) statement can have multiple reasons.
Follow this checklist:
</p>
<ul>
<li>Run ANALYSE (see documentation for details).
</li><li>Run the query with EXPLAIN and check if indexes are used (see documentation for details).
64
</li><li>If required, create additional indexes and try again using ANALYZE and EXPLAIN.
65
</li><li>If it doesn't help please report the problem.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
</li>
</ul>

<br /><a name="create_database"></a>
<h3>How to Create a New Database?</h3>
<p>
By default, a new database is automatically created if it does not yet exist.
</p>

<br /><a name="connect"></a>
<h3>How to Connect to a Database?</h3>
<p>
The database driver is <code>org.h2.Driver</code>,
and the database URL starts with <code>jdbc:h2:</code>.
To connect to a database using JDBC, use the following code:
</p>
<pre>
Class.forName("org.h2.Driver");
84
Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
85
</pre>
86

87 88 89
<br /><a name="database_files"></a>
<h3>Where are the Database Files Stored?</h3>
<p>
90 91 92
When using database URLs like jdbc:h2:~/test, the database is stored in the user directory.
For Windows, this is usually C:\Documents and Settings\&lt;userName&gt;.
If the base directory is not set (as in jdbc:h2:test), the database files are stored in the directory where the application is started
93 94 95 96 97 98 99 100
(the current working directory). When using the H2 Console application from the start menu, this is [Installation Directory]/bin.
The base directory can be set in the database URL. A fixed or relative path can be used. When using the URL
jdbc:h2:file:data/sample, the database is stored in the directory data (relative to the current working directory).
The directory must exist. It is also possible to use the fully qualified directory (and for Windows, drive) name.
Example: jdbc:h2:file:C:/data/test
</p>

<br /><a name="size_limit"></a>
101
<h3>What is the Size Limit (Maximum Size) of a Database?</h3>
102 103 104 105
<p>
The theoretical limit is currently 256 GB for the data. This number is excluding BLOB and CLOB data:
Every CLOB or BLOB can be up to 256 GB as well. The size limit of the index data is 256 GB as well.
</p>
106
<p>
107 108
The maximum file size for FAT or FAT32 file systems is 4 GB. So if you use FAT or FAT32, the
limit is 4 GB for the data.
109
</p>
110 111

<br /><a name="reliable"></a>
112
<h3>Is it Reliable?</h3>
113
<p>
114 115 116 117
That is not easy to say. It is still a quite new product. A lot of tests have been written,
and the code coverage of these tests is very high. Randomized stress tests
are run regularly. But as this is a relatively new product, there are probably
some problems that have not yet been found.
118
Areas that are not fully tested:
119
</p>
120
<ul>
121
<li>Platforms other than Windows XP and the Sun JVM 1.4 and 1.5
122
</li><li>The MVCC (multi version concurrency) mode
123
</li><li>The persistent linear hash index
124 125
</li><li>Cluster mode, 2-Phase Commit, Savepoints
</li><li>Multi-Threading and using multiple connections
126
</li><li>24/7 operation and large databases (500 MB and up)
127 128 129 130 131
</li><li>Updatable result sets
</li><li>Referential integrity and check constraints, Triggers
</li><li>ALTER TABLE statements, Views, Linked Tables, Schema, UNION
</li><li>Not all built-in functions are completely tested
</li><li>The Optimizer may not always select the best plan
132 133
</li><li>Data types BLOB, CLOB, VARCHAR_IGNORECASE, OTHER
</li><li>Server mode (well tested, but not as well as Embedded mode)
134 135
</li><li>Wide indexes with large VARCHAR or VARBINARY columns and / or with a lot of columns
</li></ul>
136

137
<p>
138
Areas considered Experimental:
139
</p>
140
<ul>
141
<li>The PostgreSQL server
142 143
</li><li>Linear Hash Index
</li><li>Compatibility modes for other databases (only some features are implemented)
144
</li><li>The ARRAY data type and related functionality
145
</li></ul>
146

147
<br /><a name="gcj"></a>
148
<h3>Is the GCJ Version Stable? Faster?</h3>
149 150 151 152 153 154 155
<p>
The GCJ version is not as stable as the Java version.
When running the regression test with the GCJ version, sometimes the application just stops
at what seems to be a random point without error message.
Currently, the GCJ version is also slower than when using the Sun VM.
However, the startup of the GCJ version is faster than when using a VM.
</p>
156

157 158 159
<br /><a name="translate"></a>
<h3>How to Translate this Project?</h3>
<p>
160
For more information, see
161
<a href="build.html#translating">Build/Translating</a>.
162 163
</p>

164
</div></td></tr></table><!-- analytics --></body></html>