Opened 15 years ago

Last modified 15 years ago

#3081 new enhancement

WFS server uses bbox in SQL query with oraclespatial, when it is not need.

Reported by: rockfire Owned by: mapserverbugs
Priority: normal Milestone:
Component: WFS Server Version: 5.4
Severity: normal Keywords:
Cc: bartvde

Description

WFS server uses bbox in query with oraclespatial, when it is not need.

When I query wfs server for features (without any filter or bbox), mapserver is using bbox in SQL query. For example:

When I use this url:

http://mapserver/cgi-bin/mapserver.fcgi?service=WFS&request=GetFeature&srs=EPSG%3A102067&version=1.0.0&typename=XXX

Mapserver creates this query (bbox is from mapfile):

SELECT rownum, GEOMETRY FROM XXX WHERE SDO_FILTER( GEOMETRY, MDSYS.SDO_GEOMETRY(2003, NULL, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-557715.354,-1184786.28,-529811.646,-1170013.72) ),'querytype=window') = 'TRUE'

This is not need and this is very slow.

Attachments (2)

wfs-oracle-without-bbox.diff (7.3 KB ) - added by rockfire 15 years ago.
wfs-oracle-without-bbox.patch (7.3 KB ) - added by rockfire 15 years ago.

Download all attachments as: .zip

Change History (4)

by rockfire, 15 years ago

by rockfire, 15 years ago

comment:1 by bartvde, 15 years ago

Cc: bartvde added

see also ticket:2725

comment:2 by rockfire, 15 years ago

I saw that ticket, but this is little different situation.

Typically example of How I use a mapserver:

In my application I'm using mapserver only for generating images. I have table with spatial data in Oracle. Table has 10 million records. Now in my application I know ID of some record in table and typically situation is that I want to zoom on this record. In other words I have ID of record with polygon and I want generate image for it. So I do these steps:

  1. I make WFS query with FEATUREID to get bbox of record.
  2. I make WMS query to get image.

If I define layer in DATA section with USING FILTER then oracle use SDO filter in first query (WFS query) it's very slow. Because there is 10 million records and all records is in SDO filter window. The second query is ok.

If I define layer in DATA section with USING NONE then first query is ok. But second query is take a long time. I want generate image of small area but mapserver get 10 million records from database. So this query must have SDO filter.

So I make this patch for situation when I want use SDO filter but I can't use it when I don't use bbox in WFS query.

Note: See TracTickets for help on using tickets.