<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Rotenhan<br>
      <br>
      You should try to add DEBUG 5 in your layer to log the SQL build
      by Mapserver and try to see what going wrong with spatial index
      (explain plan in psql).  <br>
      <br>
      Simon<br>
      <br>
      <br>
      <br>
      Le 13-05-06 11:11 AM, Rotenhan von, Wernher a écrit :<br>
    </div>
    <blockquote
cite="mid:D4283D7F79293D42BE84135851B5F8C80E5530FE4E@SZDEMHGW1245V01.suedzucker.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.E-MailFormatvorlage18
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hello List <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Im Running Mapsrever 6.0.2 on Oracle 11g
          Database <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I want to get all geometries that interact
          with a geometry I clicked within <o:p></o:p></p>
        <p class="MsoNormal">So I have todo two encapsulated sdo_relate
          calls :   <o:p></o:p></p>
        <p class="MsoNormal">--The inner one to get the geometry ic
          clicked in <o:p></o:p></p>
        <p class="MsoNormal">--The outer one to get the geometries which
          touch the clicked geometries <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">This runs very fast within my oracle
          developer ( 0.09 sec):<o:p></o:p></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">SELECT
            identnolong,<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""> 
            gresult.geodata GEODATA<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">FROM
            rms.zrgeo gresult<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">WHERE
            gresult.GEOTYPECODE = '49'<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">AND
            SDO_RELATE ( gresult.geodata ,<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                   
              (SELECT gtouching.geodata<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
              FROM rms.zrgeo gtouching<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
              WHERE gtouching.geotypecode = '49'<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
              AND gtouching.IDENTNOLONG   =<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                   
                (SELECT MAX(gwithin.IDENTNOLONG)<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
                FROM rms.zrgeo gwithin<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
                WHERE SDO_RELATE ( <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
                gwithin.geodata , <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
                MDSYS.SDO_GEOMETRY(2001,8307,MDSYS.SDO_POINT_TYPE(10.31423,49.692,NULL),NULL,NULL)
            <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
                , 'mask=ANYINTERACT') = 'TRUE'<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                                               
                AND gtouching.geotypecode ='49'<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                                                                       
                   )<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">                 
            ) <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">               ,
            'mask=ANYINTERACT') = 'TRUE';<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">But
            if I include it into my Map file <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">the
            Query becomes very slow 17 sec  <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">If
            I force Oracle not to make use of ths spacial index I get
            nearly the same response time <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">So
            is there any possibility to force the use of the spatial
            indexes ?<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">“USING
            SRID 8307”   etc does not Work !!!  because the resultset
             is a query and I have to add <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">“Using
            NONE” <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Would
            be very nice if you could hepl me !<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Regard
            Wernher<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
      </div>
      <p><span style="font-family:'MS Sans Serif';font-size:8.2pt;"> </span></p>
      <p><span style="font-family:'MS Sans Serif';font-size:8.2pt;">The
          information contained in this email is confidential. It is
          intended solely for the addressee. Access to this email by
          anyone else is unauthorized. If you are not the intended
          recipient, any form of disclosure, reproduction, distribution
          or any action taken or refrained from in reliance on it, is
          prohibited and may be unlawful. Please notify the sender
          immediately.</span></p>
      <p><span style="font-family:'MS Sans Serif';font-size:8.2pt;"> </span></p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
simon mercier
co-fondateur solutions mapgears
2383 che ste-Foy bur 202 québec, qc
canada G1V1T1

t_418_476_7139#101
m_418_559_7139
simonmercier.net / mapgears.com
</pre>
  </body>
</html>