[mapserver-users] Itemnquery slow in big TAB file; slow on Oracle as well

Bart van den Eijnden bartvde at osgis.nl
Mon Oct 3 04:59:50 EDT 2011


Hi Jelmer,

I don't know about MapInfo, but for Oracle you can skip the spatial filter by adding

USING NONE

to your DATA statement. See:

http://mapserver.org/input/vector/oracle.html

Best regards,
Bart

-- 
Bart van den Eijnden
OSGIS - http://osgis.nl

On Oct 3, 2011, at 10:46 AM, Jelmer Baas wrote:

> Hello List,
> 
> I have a query to retrieve geometry from a TAB file:
> mapserv.exe?mode=itemquery&map= query.map&mapext=-70000+280000+500000+700000&layers=MYLAYER&qlayer= MYLAYER &qstring=('[IDCOLUMN]' IN '2550643')
> 
> This is my simplified Layer definition:
> 
> LAYER
> 		NAME MYLAYER
> 		TYPE LINE
>    		CONNECTIONTYPE OGR
>    		CONNECTION "c:\temp\MYLAYER.TAB"
> 		CLASS
> 			NAME "Test"
> 		END
>    	METADATA
>  		qstring_validation_pattern '^'
>    	END 
> END
> 
> 
> To query this TAB file, MapServer needs about 20 seconds. MapInfo needs about 20ms, so MapServer is obviously not using the index on this column.
> 
> I tried changing this to Oracle Spatial, but then I bump into another problem: the query contains a spatial clause (which isn't needed):
> SELECT IDCOLUMN FROM MYLAYER WHERE 'IDCOLUMN' IN '2550643' AND SDO_FILTER( GEOLOC, MDSYS.SDO_GEOMETRY(2003, 90112, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-70000,280000,500000,700000) ),'querytype=window') = 'TRUE'
> 
> This also takes about 10 seconds. Without the AND SDO_FILTER() part it takes a few milliseconds.
> 
> So two questions, I guess. Can I make MapServer use the index on the IDCOLUMN column, and, can I tell Mapserver to skip the SDO_FILTER part on Oracle?
> 
> Oh, I'm currently using MapServer 5.6 but tried 6.0 as well.
> 
> Thank you,
> Regards,
> Jelmer Baas
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111003/eed3758a/attachment.html


More information about the mapserver-users mailing list