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

Documentation

上级 337d3aa4
...@@ -219,12 +219,13 @@ See the <a href="grammar.html">Grammar</a> for details. ...@@ -219,12 +219,13 @@ See the <a href="grammar.html">Grammar</a> for details.
</p> </p>
<p> <p>
Transaction isolation is provided for all data manipulation language (DML) statements. Transaction isolation is provided for all data manipulation language (DML) statements.
<p>
</p> </p>
<p>
Please note MVCC is enabled in version 1.4.x by default, when using the MVStore. Please note MVCC is enabled in version 1.4.x by default, when using the MVStore.
In this case, table level locking is not used. In this case, table level locking is not used.
Instead, rows are locked for update, and read committed is used in all cases Instead, rows are locked for update, and read committed is used in all cases
(changing the isolation level has no effect). (changing the isolation level has no effect).
</p>
<p> <p>
This database supports the following transaction isolation levels: This database supports the following transaction isolation levels:
</p> </p>
...@@ -1435,33 +1436,33 @@ java -cp "$dir/h2.jar:jts-1.13.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Console " ...@@ -1435,33 +1436,33 @@ java -cp "$dir/h2.jar:jts-1.13.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Console "
Here is an example SQL script to create a table with a spatial column and index: Here is an example SQL script to create a table with a spatial column and index:
</p> </p>
<pre> <pre>
CREATE TABLE GEOTABLE(GID SERIAL, THE_GEOM GEOMETRY); CREATE TABLE GEO_TABLE(GID SERIAL, THE_GEOM GEOMETRY);
INSERT INTO GEOTABLE(THE_GEOM) VALUES INSERT INTO GEO_TABLE(THE_GEOM) VALUES
('POINT(500 505)'), ('POINT(500 505)'),
('LINESTRING(550 551, 525 512, 565 566)'), ('LINESTRING(550 551, 525 512, 565 566)'),
('POLYGON ((550 521, 580 540, 570 564, 512 566, 550 521))'); ('POLYGON ((550 521, 580 540, 570 564, 512 566, 550 521))');
CREATE SPATIAL INDEX GEOTABLE_SPATIALINDEX ON GEOTABLE(THE_GEOM); CREATE SPATIAL INDEX GEO_TABLE_SPATIAL_INDEX ON GEO_TABLE(THE_GEOM);
</pre> </pre>
<p> <p>
To query the table using geometry envelope intersection, To query the table using geometry envelope intersection,
use the operation <code>&&</code>, as in PostGIS: use the operation <code>&&</code>, as in PostGIS:
</p> </p>
<pre> <pre>
SELECT * FROM GEOTABLE SELECT * FROM GEO_TABLE
WHERE THE_GEOM && 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))'; WHERE THE_GEOM && 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))';
</pre> </pre>
<p> <p>
You can verify that the spatial index is used using the "explain plan" feature: You can verify that the spatial index is used using the "explain plan" feature:
</p> </p>
<pre> <pre>
EXPLAIN SELECT * FROM GEOTABLE EXPLAIN SELECT * FROM GEO_TABLE
WHERE THE_GEOM && 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))'; WHERE THE_GEOM && 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))';
-- Result -- Result
SELECT SELECT
GEOTABLE.GID, GEO_TABLE.GID,
GEOTABLE.THE_GEOM GEO_TABLE.THE_GEOM
FROM PUBLIC.GEOTABLE FROM PUBLIC.GEO_TABLE
/* PUBLIC.GEOTABLE_SPATIALINDEX: /* PUBLIC.GEO_TABLE_SPATIAL_INDEX:
THE_GEOM && 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))' */ THE_GEOM && 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))' */
WHERE INTERSECTS(THE_GEOM, WHERE INTERSECTS(THE_GEOM,
'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))') 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))')
......
...@@ -17,7 +17,12 @@ Change Log ...@@ -17,7 +17,12 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>MVStore: the maximum cache size was artificially limited to 2 GB <ul><li>The Servlet API 3.0.1 is now used, instead of 2.4.
</li><li>MVStore: old chunks no longer removed in append-only mode.
</li><li>MVStore: the cache for page references could grow far too big, resulting in out of memory in some cases.
</li><li>MVStore: orphaned lob objects were not correctly removed in some cases,
making the database grow unnecessarily.
</li><li>MVStore: the maximum cache size was artificially limited to 2 GB
(due to an integer overflow). (due to an integer overflow).
</li><li>MVStore / TransactionStore: concurrent updates could result in a </li><li>MVStore / TransactionStore: concurrent updates could result in a
"Too many open transactions" exception. "Too many open transactions" exception.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论