提交 e0851bbf authored 作者: noelgrandin's avatar noelgrandin

Issue 459: Improve LOB documentation

上级 48e87d3b
......@@ -1268,9 +1268,13 @@ SET LOCK_TIMEOUT 1000
"Commands (Other)","SET MAX_LENGTH_INPLACE_LOB","
SET MAX_LENGTH_INPLACE_LOB int
","
Sets the maximum size of an in-place LOB object. LOB objects larger that this
size are stored in a separate file, otherwise stored directly in the database
(in-place). The default max size is 1024.
Sets the maximum size of an in-place LOB object.
If the 'h2.lobInDatabase' property is true, this is the maximum length of an LOB that is stored with the record itself,
and the default value is 128.
If the 'h2.lobInDatabase' property is false, this is the maximum length of an LOB that is stored in the database file,
and the default value is 4096.
This setting has no effect for in-memory databases.
Admin rights are required to execute this command, as it affects all connections.
......
......@@ -130,7 +130,7 @@ on the client side.
<h3>When to use CLOB/BLOB</h3>
<p>
This database stores large LOB (CLOB and BLOB) objects as separate files.
By default, this database stores large LOB (CLOB and BLOB) objects separate from the main table data.
Small LOB objects are stored in-place, the threshold can be set using
<a href="grammar.html#set_max_length_inplace_lob" class="notranslate" >MAX_LENGTH_INPLACE_LOB</a>,
but there is still an overhead to use CLOB/BLOB. Because of this, BLOB and CLOB
......@@ -138,6 +138,9 @@ should never be used for columns with a maximum size below about 200 bytes.
The best threshold depends on the use case; reading in-place objects is faster
than reading from separate files, but slows down the performance of operations
that don't involve this column.
<p>
It is possible to configure the database to store LOB objects outside the database file,
see the <a href="../javadoc/org/h2/constant/SysProperties.html#h2.lobInDatabase">h2.lobInDatase</a> property.
</p>
<h3>Large Object Compression</h3>
......
......@@ -40,6 +40,7 @@ Change Log
</li><li>Issue 274: Sybase/MSSQLServer compatibility - support index clause e.g. "select * from test (index table1_index)"
</li><li>Fix bug in optimising SELECT * FROM A WHERE X=1 OR X=2 OR X=3 into SELECT * FROM A WHERE X IN (1,2,3)
</li><li>Issue 442: groovy patch for SourceCompiler (function ALIAS)
</li><li>Issue 459: Improve LOB documentation
</li></ul>
<h2>Version 1.3.171 (2013-03-17)</h2>
......
......@@ -197,13 +197,14 @@ public class Constants {
/**
* The default maximum length of an LOB that is stored in the database file.
* Only used if h2.lobInDatabase==false.
*/
public static final int DEFAULT_MAX_LENGTH_INPLACE_LOB = 4096;
/**
* The default maximum length of an LOB that is stored with the record itself,
* and not in a separate place.
* Only used if h2.lobInDatabase is enabled.
* Only used if h2.lobInDatabase==true.
*/
public static final int DEFAULT_MAX_LENGTH_INPLACE_LOB2 = 128;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论