提交 613ec072 authored 作者: Thomas Mueller's avatar Thomas Mueller

improve documentation

上级 71f6b0cd
...@@ -18,7 +18,8 @@ Change Log ...@@ -18,7 +18,8 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>After truncating tables, opening large databases could become slow <ul><li>Connection pool: the default login timeout is now 5 minutes.
</li><li>After truncating tables, opening large databases could become slow
because indexes are always re-built unnecessarily when opening. because indexes are always re-built unnecessarily when opening.
</li><li>More bugs in the server-less multi-connection mode have been fixed: </li><li>More bugs in the server-less multi-connection mode have been fixed:
Sometimes parameters of prepared statements were lost when a reconnecting. Sometimes parameters of prepared statements were lost when a reconnecting.
......
...@@ -304,17 +304,14 @@ Unfortunately, the PolePosition test does not take this into account. ...@@ -304,17 +304,14 @@ Unfortunately, the PolePosition test does not take this into account.
<h3>Analyze First</h3> <h3>Analyze First</h3>
<p> <p>
Before trying to optimize the performance, it is important to know where the time is actually spent. Before trying to optimize performance, it is important to understand where the problem is (what part of the application is slow).
The same is true for memory problems. Blind optimization or optimization based on guesses should be avoided, because usually it is not an efficient strategy.
Premature or 'blind' optimization should be avoided, as it is not an efficient way to solve the problem. There are various ways to analyze an application. Sometimes two implementations can be compared using
There are various ways to analyze the application. In some situations it is possible to System.currentTimeMillis(). But this does not work for complex applications with many modules, and for memory problems.
compare two implementations and use System.currentTimeMillis() to find out which one is faster.
But this does not work for complex applications with many modules, and for memory problems.
</p> </p>
<p> <p>
A very good tool to measure both the memory and the CPU is the A good tool to measure both memory usage and performance is the
<a href="http://www.yourkit.com">YourKit Java Profiler</a>. This tool is also used <a href="http://www.yourkit.com">YourKit Java Profiler</a>.
to optimize the performance and memory footprint of this database engine.
</p> </p>
<p> <p>
A simple way to profile an application is to use the built-in profiling tool of java. Example: A simple way to profile an application is to use the built-in profiling tool of java. Example:
...@@ -323,7 +320,10 @@ A simple way to profile an application is to use the built-in profiling tool of ...@@ -323,7 +320,10 @@ A simple way to profile an application is to use the built-in profiling tool of
java -Xrunhprof:cpu=samples,depth=16 com.acme.Test java -Xrunhprof:cpu=samples,depth=16 com.acme.Test
</pre> </pre>
<p> <p>
Unfortunately, it is only possible to profile the application from start to end. Unfortunately, it is only possible to profile the application from start to end. Another solution is to create
a number of full thread dumps. To do that, first run <code>jps -l</code> to get the process id, and then
run <code>jstack &lt;pid&gt;</code> or <code>kill -QUIT &lt;pid&gt;</code> (Linux) or press
Ctrl+C (Windows).
</p> </p>
<br /><a name="database_profiling"></a> <br /><a name="database_profiling"></a>
...@@ -375,7 +375,7 @@ It is very important for performance that database files are not scanned for vir ...@@ -375,7 +375,7 @@ It is very important for performance that database files are not scanned for vir
The database engine does never interprets the data stored in the files as programs, The database engine does never interprets the data stored in the files as programs,
that means even if somebody would store a virus in a database file, this would that means even if somebody would store a virus in a database file, this would
be harmless (when the virus does not run, it cannot spread). be harmless (when the virus does not run, it cannot spread).
Some virus scanners allow excluding file endings. Make sure files ending with .db are not scanned. Some virus scanners allow to exclude files by suffix. Make sure files ending with .db are not scanned.
</p> </p>
<h3>Using the Trace Options</h3> <h3>Using the Trace Options</h3>
...@@ -393,7 +393,8 @@ This database uses indexes to improve the performance of SELECT, UPDATE and DELE ...@@ -393,7 +393,8 @@ This database uses indexes to improve the performance of SELECT, UPDATE and DELE
If a column is used in the WHERE clause of a query, and if an index exists on this column, If a column is used in the WHERE clause of a query, and if an index exists on this column,
then the index can be used. Multi-column indexes are used if all or the first columns of the index are used. then the index can be used. Multi-column indexes are used if all or the first columns of the index are used.
Both equality lookup and range scans are supported. Both equality lookup and range scans are supported.
Indexes are not used to order result sets: The results are sorted in memory if required. Indexes are used to order result sets, but only if the condition uses the same index or no index at all.
The results are sorted in memory if required.
Indexes are created automatically for primary key and unique constraints. Indexes are created automatically for primary key and unique constraints.
Indexes are also created for foreign key constraints, if required. Indexes are also created for foreign key constraints, if required.
For other columns, indexes need to be created manually using the CREATE INDEX statement. For other columns, indexes need to be created manually using the CREATE INDEX statement.
......
...@@ -89,7 +89,7 @@ The operations and results of the statements are shown below the script.<br /> ...@@ -89,7 +89,7 @@ The operations and results of the statements are shown below the script.<br />
<p> <p>
Click on [Disconnect]:<br /> Click on [Disconnect]:<br />
<img src="images/icon_disconnect.gif" alt="Disconnect icon" /><br /> <img src="images/icon_disconnect.gif" alt="Disconnect icon" /><br />
to close the database. to close the connection.
</p> </p>
<h4>End</h4> <h4>End</h4>
......
...@@ -18,7 +18,8 @@ Roadmap ...@@ -18,7 +18,8 @@ Roadmap
<h1>Roadmap</h1> <h1>Roadmap</h1>
<p> <p>
New (feature) requests will usually be added at the very end of the list. The priority is increased for important and popular requests. New (feature) requests will usually be added at the very end of the list. The priority is increased for important and popular requests.
Of course, patches are always welcome, but are not always applied as is. Patches should include test cases and documentation. Of course, patches are always welcome, but are not always applied as is.
See also <a href="build.html#providing_patches">Providing Patches</a>.
</p> </p>
<h2>Priority 1</h2> <h2>Priority 1</h2>
......
...@@ -124,7 +124,7 @@ To change this, go to 'Preferences' and select 'Allow connections from other com ...@@ -124,7 +124,7 @@ To change this, go to 'Preferences' and select 'Allow connections from other com
<h3>Testing Java</h3> <h3>Testing Java</h3>
<p> <p>
To check the Java version you have installed, open a command prompt and type: To find out which version of Java is installed, open a command prompt and type:
</p> </p>
<pre> <pre>
java -version java -version
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论