Oracle and SELECTs with OGR . .

Frank Warmerdam warmerdam at POBOX.COM
Wed Jan 4 12:33:56 PST 2006


On 1/4/06, Bob Basques <bob.basques at ci.stpaul.mn.us> wrote:
> All (well actually, those OGR GURUs),
>
> Anyone have an example (request Syntax) of using a OGR connection to
> filter with a Outer Select using MapServers IMGEXT as the inner select?
>
> We're trying to run a complicated SELECT statement against a layer in
> Oracle, but would like to use the MapServer IMGEXT as the inner SELECT
> and having problems figureing it out.
>
> How can the MapServer Spatial filter be used in the inner SELECT before
> we filter with our Select?
>
> What should the MAPFILE elements look like?
>
> What we want to do as the "outer select":
>
> select * from sewer_permits1 where ogr_fid in (select max(ogr_fid) from
> sewer_permits1 group by id);
>
> We can't seem to get this to be used AFTER the Spatial Select occurs
> from the MapServer Request.  It's rather slow if it's used before the
> MapServer Spatial Filter, so we need the Spatial aspects to run first,
> then run this statement on the output from the MapServer Spatial
> operation instead of the whole DB.

Bob,

I don't think it is possible to use an accelerated
spatial query with a SELECT statement (that is using
the ExecuteSQL() entry in the driver) in the OGR OCI
driver.   If you aren't in a position to use the built-in
Oracle support in Mapserver, you may have to start
changing code in non-trivial ways.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list