Is it possible to create Spatial Index on SDO_GEOM column even if some of these are NULLYes.
SQL> CREATE TABLE test (ID NUMBER PRIMARY KEY, geom MDSYS.SDO_GEOMETRY); Table created. -- "insert a row with non-NULL geometry" SQL> INSERT INTO test VALUES (1, SDO_GEOMETRY('POINT (6000000 2100000)', 40986)); 1 row created. -- "insert a row with NULL geometry" SQL> INSERT INTO test VALUES (2, NULL); 1 row created. SQL> CREATE INDEX test_spx ON test (geom) INDEXTYPE IS MDSYS.SPATIAL_INDEX; Index created.
...and get results by spatial queryYes, presuming your data is valid.
If you're having trouble here, I suspect you may be using functions that are choking on NULLs, e.g., converting a NULL geometry to/from WKT.
-- "Creates a 10' buffer around the point we previsouly inserted then applies SDO_INSIDE" SQL> SELECT ID, SDO_INSIDE(geom, SDO_GEOM.SDO_BUFFER(geom, 10, 1)) FROM test; 1 TRUE --"our point geometry" 2 FALSE --"our NULL" 2 rows selected.