<br><tt><font size=2>Hi</font></tt>
<br>
<br><tt><font size=2>&gt; By adding the keyword /*+ ordered */ to the select
statement considerably<br>
&gt; speeds up the quary. The resulting SQL statement the looks like this:<br>
&gt; SELECT /*+ ordered */OBJECTID, OBJTYPE, SHAPE FROM KARTDATA.N50_HoydeKontur
<br>
&gt; ...</font></tt>
<br>
<br><font size=2 face="sans-serif">What about this?</font>
<br>
<br><tt><font size=2>LAYER<br>
 &nbsp;NAME &quot;N50Hoydekurver&quot;<br>
 &nbsp;...</font></tt>
<br><tt><font size=2>&nbsp; DATA &quot;</font></tt><tt><font size=2 color=red>SHAPE
FROM (SELECT /*+ ordered */ OBJECTID, OBJTYPE, SHAPE FROM KARTDATA.N50_HoydeKontur)</font></tt><tt><font size=2>
USING UNIQUE OBJECTID VERSION 10g&quot;</font></tt>
<br><tt><font size=2>&nbsp; ...</font></tt>
<br>
<br>
<br><font size=2 face="sans-serif">Benedikt Rothe</font>
<br>
<br><tt><font size=2>UMN MapServer Users List &lt;MAPSERVER-USERS@LISTS.UMN.EDU&gt;
schrieb am 04.12.2007 09:33:29:<br>
<br>
&gt; Hi!<br>
&gt; <br>
&gt; I have set up a mapfile with layers that uses oracle spatial data.
The<br>
&gt; problem is that the performance is rather bad. This is how I have
set up the<br>
&gt; connection in the LAYER object.<br>
&gt; <br>
&gt; &nbsp; &nbsp;LAYER<br>
&gt; &nbsp; &nbsp; &nbsp; NAME &quot;N50Hoydekurver&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; STATUS ON<br>
&gt; &nbsp; &nbsp; &nbsp; CONNECTION &quot;user/pass@KARTINNS_SKRIVDB06&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; CONNECTIONTYPE oraclespatial<br>
&gt; &nbsp; &nbsp; &nbsp; DATA &quot;SHAPE FROM KARTDATA.N50_HoydeKontur
USING UNIQUE OBJECTID<br>
&gt; VERSION 10g&quot;<br>
&gt; <br>
&gt; When this layer is queried the resulting SQL that is submitted to
the<br>
&gt; database typically looks like this:<br>
&gt; <br>
&gt; SELECT OBJECTID, OBJTYPE, SHAPE FROM KARTDATA.N50_HoydeKontur <br>
&gt; WHERE SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, NULL,<br>
&gt; NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.<br>
&gt; SDO_ORDINATE_ARRAY(-26711.6293,6726071.91,-14068.0091,6736415.72)<br>
&gt; ),'querytype=window') = 'TRUE'<br>
&gt; <br>
&gt; By adding the keyword /*+ ordered */ to the select statement considerably<br>
&gt; speeds up the quary. The resulting SQL statement the looks like this:<br>
&gt; <br>
&gt; SELECT /*+ ordered */OBJECTID, OBJTYPE, SHAPE FROM KARTDATA.N50_HoydeKontur
<br>
&gt; WHERE SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, NULL,<br>
&gt; NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.<br>
&gt; SDO_ORDINATE_ARRAY(-26711.6293,6726071.91,-14068.0091,6736415.72)<br>
&gt; ),'querytype=window') = 'TRUE'<br>
&gt; <br>
&gt; This test is performed manually because I haven't find anywhere to
insert<br>
&gt; the keyword in the mapfile. Anyone have any ideas on how I could accomplish<br>
&gt; to tell MapServer to insert the keyword before sending the SQL to
the<br>
&gt; database?<br>
&gt; <br>
&gt; regards,<br>
&gt; Pål Kristensen<br>
&gt; -- <br>
&gt; View this message in context: http://www.nabble.com/Oracle-spatial-<br>
&gt; performance-issue-tf4941783.html#a14146626<br>
&gt; Sent from the Mapserver - User mailing list archive at Nabble.com.<br>
</font></tt>