<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><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]--></head><body lang=EN-US link=blue vlink=purple><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></body></html>