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

Documentation

上级 337d3aa4
......@@ -219,12 +219,13 @@ See the <a href="grammar.html">Grammar</a> for details.
</p>
<p>
Transaction isolation is provided for all data manipulation language (DML) statements.
<p>
</p>
<p>
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.
Instead, rows are locked for update, and read committed is used in all cases
(changing the isolation level has no effect).
</p>
<p>
This database supports the following transaction isolation levels:
</p>
......@@ -1435,35 +1436,35 @@ 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:
</p>
<pre>
CREATE TABLE GEOTABLE(GID SERIAL, THE_GEOM GEOMETRY);
INSERT INTO GEOTABLE(THE_GEOM) VALUES
('POINT(500 505)'),
CREATE TABLE GEO_TABLE(GID SERIAL, THE_GEOM GEOMETRY);
INSERT INTO GEO_TABLE(THE_GEOM) VALUES
('POINT(500 505)'),
('LINESTRING(550 551, 525 512, 565 566)'),
('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>
<p>
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>
<pre>
SELECT * FROM GEOTABLE
SELECT * FROM GEO_TABLE
WHERE THE_GEOM && 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))';
</pre>
<p>
You can verify that the spatial index is used using the "explain plan" feature:
</p>
<pre>
EXPLAIN SELECT * FROM GEOTABLE
EXPLAIN SELECT * FROM GEO_TABLE
WHERE THE_GEOM && 'POLYGON ((490 490, 536 490, 536 515, 490 515, 490 490))';
-- Result
SELECT
GEOTABLE.GID,
GEOTABLE.THE_GEOM
FROM PUBLIC.GEOTABLE
/* PUBLIC.GEOTABLE_SPATIALINDEX:
GEO_TABLE.GID,
GEO_TABLE.THE_GEOM
FROM PUBLIC.GEO_TABLE
/* PUBLIC.GEO_TABLE_SPATIAL_INDEX:
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))')
</pre>
<p>
......
......@@ -17,7 +17,12 @@ Change Log
<h1>Change Log</h1>
<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).
</li><li>MVStore / TransactionStore: concurrent updates could result in a
"Too many open transactions" exception.
......@@ -29,18 +34,18 @@ Change Log
</li><li>The default limit for in-place LOB objects was changed from 128 to 256 bytes.
This is because each read creates a reference to a LOB, and maintaining the references
is a big overhead. With the higher limit, less references are needed.
</li><li>Tables without columns didn't work.
</li><li>Tables without columns didn't work.
(The use case for such tables is testing.)
</li><li>The LIRS cache now resizes the table automatically in all cases
</li><li>The LIRS cache now resizes the table automatically in all cases
and no longer needs the averageMemory configuration.
</li><li>Creating a linked table from an MVStore database to a non-MVStore database
created a second (non-MVStore) database file.
</li><li>In version 1.4.184, a bug was introduced that broke queries
</li><li>In version 1.4.184, a bug was introduced that broke queries
that have both joins and wildcards, for example:
select * from dual join(select x from dual) on 1=1
</li><li>Issue 598: parser fails on timestamp "24:00:00.1234" - prevent the creation of out-of-range time values.
</li><li>Allow declaring triggers as source code (like functions). Patch by Sylvain CUAZ.
</li><li>Make the planner use indexes for sorting when doing a GROUP BY where
</li><li>Make the planner use indexes for sorting when doing a GROUP BY where
all of the GROUP BY columns are not mentioned in the select. Patch by Frederico (zepfred).
</li><li>PostgreSQL compatibility: generate_series (as an alias for system_range). Patch by litailang.
</li><li>Fix missing "column" type in right-hand parameter in ConditionIn. Patch by Arnaud Thimel.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论