1.19 Database In-Memory Support by Oracle Spatial
Spatial supports the use of Oracle Database In-Memory technology.
You can enable a spatial table for use with Database In-Memory by adding virtual columns, and then use operators such as SDO_FILTER to query that table without using a spatial index.
You create a spatial table in the usual way. Assume an existing 2D geodetic table named vz_test1
with spatial column geoloc
, which has been inserted into the USER_SDO_GEOM_METADATA
view as follows:
INSERT INTO user_sdo_geom_metadata
VALUES(
'vz_test1',
'geoloc',
SDO_DIM_ARRAY(
SDO_DIM_ELEMENT('X', -180, 180, .00000005),
SDO_DIM_ELEMENT('Y', -90, 90, .00000005)),
8307);
COMMIT;
Modify the table to enable the in-memory spatial feature and specify
INMEMORY
for the spatial table. For example, for the preceding 2D
table:
ALTER TABLE vz_test1 INMEMORY INMEMORY SPATIAL(geoloc);
Then, users can run queries on the table. For example:
SELECT * FROM vz_test1 WHERE SDO_FILTER(geoloc, :x) = 'TRUE';
This approach does not need a spatial index because the table is in Oracle Database In-Memory.
Parent topic: Spatial Concepts