How to speed up SQL spatial query (spatial index error)

Hi,
Im trying to split polylines by points which have a small buffer around them. Currently i have over 370,000 lines and 320,000 nodes and the query is running really slowly (ive left it for 3 days and it still hasnt completed). I have tried forcing a spatial
index using with (Index(SI_tempPD)) but i get the following error:
"The query processor could not produce a query plan for a query with a spatial index hint. Reason: Could not find required binary spatial method in a condition. Try removing the index hints or removing SET FORCEPLAN."
below is the snippet of code that im trying to run when i get the error:
BEGIN INSERT INTO TempLines ( [linenum] ,[ogr_geometry] ) SELECT lines.[linenum] ,lines.[ogr_geometry].STDifference(points.[ogr_geometry].STBuffer(0.005)) AS ogr_geometry FROM dbo.TemplineData AS lines with(Index(SI_tempPD)) INNER JOIN dbo.[TemplineNodes] AS points ON lines.[ogr_geometry].STIntersection(points.[ogr_geometry]).STDistance(points.[ogr_geometry]) < 1 WHERE (lines.[linenum] <> points.[linenum]) END
 is there anyway i can speed up the query? (I also have a clustered primary key) the execution plan shows that a filter takes up 36% of the cost and the insert takes up 64%
Any help would be greatly appreciated! (im using SQL Server 2008 (SQL server Management studio 10.50.1600.1))

SQL Server spatial indexes don't support STDifference or STIntersection, see
https://technet.microsoft.com/en-us/library/bb895373(v=SQL.105).aspx, which is why you get the error. 
Your query is doing multiple expensive spatial operations against some fairly good-size tables in a join. You might get better results by either breaking the query into multiple simpler queries (SELECT into a temporary table and move the STDifference and
STBuffer and INSERT off to a separate statement), and (if possible) rearchitecting the query to use STIntersects (which does support spatial index) rather than STIntersection.
Hope this helps, Bob

Similar Messages

  • How to use : bind character in DB adapter Select Query SOA11g. Getting Error code :17003 .java.sql.SQLException: Invalid column index error

    Hi All,
    The Actual query to perform is below.
    SELECT name,number from emp  WHERE CASE WHEN :1='T' AND term_date IS Not NULL THEN 1 WHEN :1='A' AND term_date IS NULL THEN 1 WHEN :1='ALL' THEN 1 ELSE  1 END = 1;
    I have tried in DB adapter like below as a parameter for :1 as #vInputParam
    SELECT name,number from emp  WHERE CASE WHEN #vInputParam='T' AND term_date IS Not NULL THEN 1 WHEN #vInputParam='A' AND term_date IS NULL THEN 1 WHEN #vInputParam='ALL' THEN 1 ELSE  1 END = 1;
    Getting Error code :17003 .java.sql.SQLException: Invalid column index error.
    Please suggest me on using ':' bind character in DB adapter Select Query SOA11g.
    Can someone help me on this please?
    Thanks,
    Hari

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • How to speed up SQL*Plus over long distances

    We are using Oracle 10g on Solaris 10.
    We have a customer that is located several thousand miles and is accessing our database using SQL*Plus as well as a custom java app we developed. Any query our customer runs against our database is as much as 500 times slower than run locally. I ran some test queries to see just how much slower it was.
    If I run this query:
    SELECT id FROM test_data WHERE ROWNUM < 300000;
    (The test_data table contains about 1,000,000 rows of sample data and 31 columns)
    It takes about 8 seconds on our intranet. It takes about 1 – 1.3 hours for our customer.
    I chose this query because I wanted a query that took at least a few seconds locally. Most of our customer’s queries return less rows, and are more complicated, but this query is easily to work with and shows what I think is the problem.
    I also made a java test app the runs the same query and it also takes the same amount of time.
    If I spool the results of this query to a file, it creates a 4MB file. If I ftp this file to the customer, it takes only 30 seconds. So it seems like just moving the data is not the slow part; although I am not sure this is a fair comparison.
    When I run a ping between the customer and me, the average latency is 250ms. It seems like this high latency may be slowing down the transfer of query results.
    I need to make the results return faster in both SQL*Plus and Java. It is not necessary to see any of the results until they have all been transferred.
    Is there a way to speed this up, like sending the results all at once instead of a piece at a time? Would incressing the size of the buffers or the size of the Session Data Unit have any effect?
    I am not greatly experianced with Oracle, am I misunderstanding the way it transfers data to the client?
    Any suggestions would be greatly appreciated.
    Tom

    I have tried running a few qurys from the remote computer both with FLUSH ON and FLUSH OFF. The querys execute in the same amount of time either way.

  • How to speed up a MDX Query

    Hi
    I have a MDX query that takes 30 seconds and I need to speed it up. Any suggestions ? Also any settings to change on the SSAS box ?
    with
     set __XLSlice0 as { [Measures].[Summary Pct YearDiff QTD], [Measures].[Summary Pct YearDiff QTD Sailed] }
     set __XLExistingMembers as 
    NonEmpty(
    [DateDimCreate].[AsYearQuarter].[AsYearQuarter].allmembers,
    __XLSlice0)
     set __XLExistingRangeMembers as SubSet(__XLExistingMembers, 0, 1000)
     set __XLNonExistingRangeMembers as 
    Iif(__XLExistingRangeMembers.Count = 10000, 
    SubSet( Except([DateDimCreate].[AsYearQuarter].[AsYearQuarter].allmembers, __XLExistingMembers),  
    iif (0 - __XLExistingMembers.Count < 0, 0, 0 - __XLExistingMembers.Count), 
    1000 ) 
    member [Measures].__XLRelated as Intersect( [DateDimCreate].[AsYearQuarter].currentmember, __XLExistingRangeMembers ).Count
     set __XLTargetSet as SubSet(Union(__XLExistingRangeMembers, __XLNonExistingRangeMembers), 0, 1000)
    select { [Measures].__XLRelated } on 0, 
    __XLTargetSet on 1 
    from [Model] 
    cell properties value
    Thanks
    <p>Javier Villegas | <a href="http://www.twitter.com/javier_vill" target="_blank" title="Twitter" rel="nofollow"> @javier_vill</a> |&nbsp;<a href="http://sql-javier-villegas.blogspot.com/"
    rel="nofollow">http://sql-javier-villegas.blogspot.com/</a></p> Please click &quot;Propose As Answer&quot; if a post solves your problem or &quot;Vote As Helpful&quot; if a post has been useful to you

    Hi Javier,
    According to your description, you want to optimize the performance of above query. Right?
    In MDX query, please avoid run-time checks in an MDX calculation that result in a slow execution path to make the MDX more efficient. If you use the Case and IF functions to perform condition checks which must be resolved many times during query resolution,
    you will have a slow execution path. Rewrite these queries using the SCOPE function to quickly reduce the calculation space to which an MDX calculation refers. Please refer to links below:
    Analysis Services Query Performance Top 10 Best Practices
    Budget Variance - A study of MDX optimizations: evaluation modes and NON_EMPTY_BEHAVIOR
    Comparing Levels in MDX and CONDITION vs. SCOPE in cell calculations
    Performance of IIF function in MDX
    Best Regards,
    Simon Hou
    TechNet Community Support

  • How to find auditing SQL Text query information

    Hi,
    I am using auditing:
    SQL>select object_name,action_name,sql_text from dba_audit_trail;
    UPDATE SIS_STUDENT_COURSES SET DENIAL_DATE = :B5 , LETTER_GRADE = :B2 WHERE SEMESTER = :B4 AND COURSE_NO = 4035 AND STUDENT_ID = :B3 AND NVL(LETTER_GRADE, 'x') NOT IN(:B2 , :B1 );In the above query, I am unable to understand the B5,B1,B2,B3 etc..
    as my understand its bind variables but the in actual database query is not using any bind variable.
    How can I find the exact SQL Text? I mean what exact sql statement was raised by database user.

    Hi JIC,
    the bind values are in the sql_bind column in dba_audit_trail, the binds you see look like being generated by your application,
    however they may be system generated bind values if parameter cursor_sharing is being used. It is not recommended to
    disable cursor sharing just to see the original sql statement in the audit records. It generally makes no sense to try to reconstruct
    the statement 'as if' no binds were being used.
    greetings,
    Harm ten Napel

  • How to run a SQL based query against a specific collection

    Hello,
    I have used this query to make a custom reports, it works but all machines are mixed up,
    So I am looking for a way to run it against collection group win 8 or win 8.1.
    or if I can add a line to this query so it will also display OS version.
    SELECT     dbo.v_R_System.Name0, dbo.v_GS_ENCRYPTABLE_VOLUME.DriveLetter0, dbo.v_GS_ENCRYPTABLE_VOLUME.ProtectionStatus0
    FROM         dbo.v_GS_ENCRYPTABLE_VOLUME INNER JOIN
                          dbo.v_R_System ON dbo.v_GS_ENCRYPTABLE_VOLUME.ResourceID = dbo.v_R_System.ResourceID
    Thanks in advance
     

    Corrected :
    SELECT dbo.v_R_System.Name0, dbo.v_GS_ENCRYPTABLE_VOLUME.DriveLetter0, dbo.v_GS_ENCRYPTABLE_VOLUME.ProtectionStatus0
    FROM dbo.v_GS_ENCRYPTABLE_VOLUME
    INNER JOIN dbo.v_R_System ON dbo.v_GS_ENCRYPTABLE_VOLUME.ResourceID = dbo.v_R_System.ResourceID
    JOIN v_GS_Operating_System OS on dbo.V_R_System.ResourceID = OS.ResourceID
    WHERE OS.Caption0 like '%Windows 8%'
    I also did it by CollectionID if needed :
    SELECT dbo.v_R_System.Name0, dbo.v_GS_ENCRYPTABLE_VOLUME.DriveLetter0, dbo.v_GS_ENCRYPTABLE_VOLUME.ProtectionStatus0
    FROM dbo.v_GS_ENCRYPTABLE_VOLUME
    INNER JOIN dbo.v_R_System ON dbo.v_GS_ENCRYPTABLE_VOLUME.ResourceID = dbo.v_R_System.ResourceID
    JOIN v_FullCollectionMembership COL on dbo.V_R_System.ResourceID = COL.ResourceID
    WHERE COL.CollectionID like 'Your Collection ID'
    Benoit Lecours | Blog: System Center Dudes

  • How to monitor perticuler sql statement using the INDEX or not?

    I am running on a long running quary, and the output is comming very late. So i want to know the sql quary is using the index or not? How to know that?

    If you want to check the real execution plan of a running query without waiting for query completion, you can try following steps that you should adapt to your query and your environment:
    1. start the query
    select
    count(*)
    from all_objects, all_objects;2. Retrieve in another session the SQL_ID and the CHILD_NUMBER of the running query:
    select sql_id, child_number, sql_text
    from v$sql
    where sql_text like '%all_objects%';3. use DBMS_XPLAN.DISPLAY_CURSOR to get the real execution plan from shared pool using SQL_ID and CHILD_NUMBER from step 2:
    select * from table(dbms_xplan.display_cursor(<sql_id>,<child_number>));Actually you don't need to restart the query if it is already running because the hint GATHER_PLAN_STATISTICS is only needed if you want to have current execution statistics.
    Edited by: P. Forstmann on 2 mars 2011 10:23

  • How to generate a dynamic update query to update error flag in a mapping?

    i have a mapping in which i m loading log table through generated parameter file.But i want to update the error flag using dynamic update query.for that i have to generate a query and use update sqloverridw in target instances.but i m not getting how to implement it.Please help..!!

    Hi  All, I have a scenario. Below is the source record. field1|field2|field3|field4|field5|field6|field7
    5|20150329|1|980100001|500|My name is Lalita|25
    5|20150329|1|303444442|200|My name is |Lalita.I work in TCS|26
    5|20150329|1|442101001|1000|My name is Lalita.I worked Syntel|56
    5|20150329|1|446788900|300|My name|67  My source file is | separator. But for field6 the data might come with '|'.
    So I want to import the data along with '|' after separating all field in Informatica Layer.  Source team is not going to preformat the file. Please suggest how to achive this.

  • Java.sql.SQLException: Invalid column index error While getClob()

    I have code which works fine in Iplanet or stand alone Java program using WLS Connection Pool, But not from the the WLS servlet.
    This uses 9.1 Oracle JDBC Thin Driver
    Code snippet:
    cstmt.setString(1, servicename);
    cstmt.setString(2, params);
    String resultXmlString = null;
    cstmt.registerOutParameter(3,java.sql.Types.CLOB);
    cstmt.execute();
    Clob clob = cstmt.getClob(3);
    int val;
    long size = clob.length();
    StringBuffer full_text = new StringBuffer();
    if (clob != null)
    java.io.Reader clobReader = clob.getCharacterStream();
    while((val = clobReader.read()) > 0)
    full_text.append((char) val);
    resultXmlString = full_text.toString();

    I have code which works fine in Iplanet or stand alone Java program using WLS Connection Pool, But not from the the WLS servlet.
    This uses 9.1 Oracle JDBC Thin Driver
    Code snippet:
    cstmt.setString(1, servicename);
    cstmt.setString(2, params);
    String resultXmlString = null;
    cstmt.registerOutParameter(3,java.sql.Types.CLOB);
    cstmt.execute();
    Clob clob = cstmt.getClob(3);
    int val;
    long size = clob.length();
    StringBuffer full_text = new StringBuffer();
    if (clob != null)
    java.io.Reader clobReader = clob.getCharacterStream();
    while((val = clobReader.read()) > 0)
    full_text.append((char) val);
    resultXmlString = full_text.toString();

  • Java.sql.SQLException: Invalid column index in database adapter

    I have a query that works fine if I run the sql in a JDeveloper SQL editor, but I get a "java.sql.SQLException: Invalid column index" error if I paste it in a database adapter. If I put this query in the adapter:
    select <column>
      from <table>
       where <column> in (select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1)I get the error. But if I just put the sub query in the adapter as:
    select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1the error goes away. Does anyone know what might be causing this?
    Thanks in advance

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • SQL Exception: Invalid column index while calling stored proc from CO.java

    Hello all,
    I am getting a "SQL Exception: Invalid column index" error while calling stored proc from CO.java
    # I am trying to call this proc from controller instead of AM
    # PL/SQL Proc has 4 IN params and 1 Out param.
    Code I am using is pasted below
    ==============================================
              OAApplicationModule am = (OAApplicationModule)oapagecontext.getApplicationModule(oawebbean);
    OADBTransaction txn = (OADBTransaction)am.getOADBTransaction();
    OracleCallableStatement cs = null;
    cs = (OracleCallableStatement)txn.createCallableStatement("begin MY_PACKAGE.SEND_EMAIL_ON_PASSWORD_CHANGE(:1, :2, :3, :4, :5); end;", 1);
         try
    cs.registerOutParameter(5, Types.VARCHAR, 0, 2000);
                        cs.setString(1, "[email protected]");
                             cs.setString(2, s10);
    //Debug
    System.out.println(s10);
                             cs.setString (3, "p_subject " );
                             cs.setString (4, "clob_html_message - WPTEST" );
                   outParamValue = cs.getString(1);
    cs.executeQuery();
    txn.commit();
    catch(SQLException ex)
    throw new OAException("SQL Exception: "+ex.getMessage());
    =========================================
    Can you help please.
    Thanks,
    Vinod

    You may refer below URL
    http://oracleanil.blogspot.com/2009/04/itemqueryvoxml.html
    Thanks
    AJ

  • SSRS - SQL Server Spatial Query

    Hi, I was hoping someone could help me.
    I'm creating an SSRS report with Map and importing points via SQL Server Spatial query. I have a db table with 8,000 points bu the import only ever brings in the first 2,000 queried (no matter what the filter is). Is there a limitation in SSRS that can be
    changed via a configuration setting?
    Many thanks in advance for any help on this,
    Steve.

    Really appreciate you coming back so quick Olaf.
    No its a straightforward query (select AccountNum, Name, Address, Longitude, Lattitude, UrbanArea, County, MI_STYLE, MI_PRINX, SP_GEOMETRY from <table>)
    Just to give the whole picture. I had 8,000 points in MapInfo version 10. I imported them to SQL Server 2012 via MapInfo Easy Loader.
    The SQL Server spatial points import to SSRS and the Bing overlay map works great (so they import to correct space) but its only a subset of the points that import. I can pick any subset using the WHERE clause but I cannot get all 8,000 points.  
    I was hoping there was a configuration setting somewhere in SSRS that was causing the problem.

  • PL/SQL spatial query will not compile.

    I have a PL/SQL spatial query that will not compile, but the equivalent SQLPlus query works fine. I.e. (convert decimal degrees to degrees,minutes,seconds)
    Any thoughts much appreciated....
    THIS WORKS in SQLPlus
    select
    decode(rownum,1,decode(sign(b.column_value),-1,'W','E'),2,decode(sign(b.column_v
    alue),-1,'S','N'))&#0124; &#0124;
    to_char(abs(trunc(b.column_value,0)),'999')
    &#0124; &#0124;to_char(abs(trunc((b.column_value - trunc(b.column_value,0)) * 60,0)),'99')
    &#0124; &#0124;to_char(abs(
    (((b.column_value - trunc(b.column_value,0)) * 60) - trunc((b.column_value - tru
    nc(b.column_value,0)) * 60,0)) * 60
    ),'99.99')
    from route_location a, table(a.line.sdo_ordinates) b
    where a.route_adms_id = 13820370
    and record_seq_num = 26
    and rownum < 3
    BUT THIS DOES NOT
    ADMS>create or replace procedure PKG_route_loc_latlong_ins
    2 (iADMS_ID in INTEGER, iRSN in INTEGER,
    3 vcLAT out VARCHAR2, vcLONG out VARCHAR2) as
    4 cursor c1 is
    5 select decode(rownum,1,decode(sign(b.column_value),-1,'W','E'),
    6 2,decode(sign(b.column_value),-1,'S','N'))
    7 &#0124; &#0124;to_char(abs(trunc(b.column_value,0)),'999')
    8 &#0124; &#0124;to_char(abs(trunc((b.column_value - trunc(b.column_value,0)) * 60,0)),
    '99')
    9 &#0124; &#0124;to_char(abs(
    10 (((b.column_value - trunc(b.column_value,0)) * 60) -
    11 trunc((b.column_value - trunc(b.column_value,0)) * 60,0)) * 60
    12 ),'99.99')
    13 from route_location a, table(a.line.sdo_ordinates) b
    14 where a.route_adms_id = iADMS_ID
    15 and a.record_seq_num = iRSN
    16 and rownum < 3;
    17 BEGIN
    18 open c1;
    19 fetch c1 into vcLONG;
    20 fetch c1 into vcLAT;
    21
    22 EXCEPTION
    23 when others then
    24 vcLAT := 'ERROR';
    25 RAISE_APPLICATION_ERROR(-20002,
    26 'XXXXXXXXXXXXXX ');
    27
    28 END pkg_route_loc_latlong_ins;
    29 /
    Warning: Procedure created with compilation errors.
    ADMS>
    ADMS>show errors
    Errors for PROCEDURE PKG_ROUTE_LOC_LATLONG_INS:
    LINE/COL ERROR
    5/5 PL/SQL: SQL Statement ignored
    5/12 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    5/12 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    13/34 PLS-00201: identifier 'A.LINE' must be declared
    19/5 PL/SQL: SQL Statement ignored
    20/5 PL/SQL: SQL Statement ignored
    null

    try a
    FOR UPDATE OF ID NOWAIT;where ID is the name of a column in the table.

  • How to create spatial query (sdo_relate) on 2 views

    Hi, I want to create a spatial query in the form of:
    select /*+ORDERED*/ column1,column2
    from view1,view2
    where sdo_relate(view2.geometry,view1.geometry,'mask= ... ')Both views are very fast and return a smal number of rows out of a large dataset. I would expect that running the spatial query on this selection should be fast but when performing the above query it takes quite some time.
    It seems that the spatial query is performed on the underlying tables before the views make their selection.
    What is a good way to handle this kind of problem? How to make the spatial query to be executed on the resultset of the views?
    thanks Rene

    Hi Udo,
    Let me tell you a bit more about the requirements of the application.
    We have a table with geometries. Some geometries are buildings, others are roads, trees, parking areas, etc.
    We let users specify what geometries they are interested in. This can be the type (tree, building) or a list of types, plus some other selection such as type of tree, name of road etc. Based on the specifications the application creates a view that returns exactly the geometries the user is interested in.
    Users may not only be interested in just a tree but may be looking for a tree located inside a building, or a building within a certain distance from a road. This then would be the query I am talking about in this post. Two views and a spatial relationship between them.
    Depending on the definition of the views and the data currently loaded the number of rows returned by the views will vary. I can't be there all the time making sure that the correct table is queried first and the correct hints are given. This is why we have the CBO. But it seems to do a poor job when it comes to spatial queries.
    Rene

  • Spatial Query with multiple geometries from 2 tables

    Hi,
    I'm using Oracle 8.1.7. I am trying to do a spatial query on two tables with multiple geometries. There are two spatial tables. One made up of points and one made up of polygons. There are 829551 rows in the table of points and 1817795 rows in the table with polygons...
    I want to find all polygons where one of this points is within it...
    This query is pretty intensive querying two large spatial tables against each other and so I need to find the most efficient way of running this query. I've been running variations of my query for the last two week and every time it's bombed out with various errors after 12-24 hrs processing like out of memory, out of tablespace, out of processing, invalid index etc etc etc. I need to get this query run asap... Any tips would be gratefully appreciated..
    For the session running the query I've allocated 16M sort area with
    ALTER SESSION SET SORT_AREA_SIZE=16777216;
    Below is the query I'm running... How can I improve this please? BTW PARCEL_OVERLAPS contains the points and TP$_PARCEL_AREAS the polygons.
    SELECT lu.LNU_PARCEL_ID
         FROM
              seventy.PARCEL_OVERLAPS po,
              imap_topol.TP$_PARCEL_AREAS pa,
              TP$_PARCEL_CENTROID_AREA pca,
              TDCR_LAND_UNIT lu
         WHERE
              SDO_FILTER(po.geometry, pa.area,
              'querytype=WINDOW') = ’TRUE’ and
              sdo_within_distance(po.geometry,pa.area,'distance=0')='TRUE' and
              pa.delete_date is null and
              Lu.LNU_LAND_UNIT_UNIQUE_NUM = pca.CENTROID_ID and
              pa.AREA_ID = pca.AREA_ID and
              pca.DELETE_DATE IS NULL and
              pa.DELETE_DATE IS NULL;

    Albert,
    Thanks for your reply and the tips you've given. The tp$_parcel_areas table will always be bigger so I've changed the order to sdo_within_distance(pa.area,po.geometry,'distance=0')='TRUE'. The requested counts for those queries are
    12:26:29 [email protected]:SQL> select count(*)
    13:46:22 2 from seventy.PARCEL_OVERLAPS;
    COUNT(*)
    612
    13:48:12 [email protected]:SQL> select count(*)
    13:48:17 2 from imap_topol.TP$_PARCEL_AREAS pa,
    13:48:21 3 TP$_PARCEL_CENTROID_AREA pca
    13:48:21 4 where pca.DELETE_DATE IS NULL
    13:48:21 5 and pa.DELETE_DATE IS NULL
    13:48:21 6 and pa.AREA_ID = pca.AREA_ID;
    COUNT(*)
    1310665
    There was no reason for both filter and within_distance. I did try use the anyinteract but for some reason that does not return the desired results(I've added one id row as a test to make sure it returns desired results). Plus Oracle have recomended using the within distance for better performance..
    so the explan plan for
    14:38:37 [email protected]:SQL> EXPLAIN PLAN FOR
    14:38:50 2 SELECT lu.LNU_PARCEL_ID
    14:38:50 3 FROM
    14:38:50 4 seventy.PARCEL_OVERLAPS po,
    14:38:50 5 imap_topol.TP$_PARCEL_AREAS pa,
    14:38:50 6 TP$_PARCEL_CENTROID_AREA pca,
    14:38:50 7 TDCR_LAND_UNIT lu
    14:38:50 8 WHERE
    14:38:50 9 sdo_within_distance(pa.area,po.geometry,'distance=0')='TRUE' and
    14:38:50 10 pa.delete_date is null and
    14:38:50 11 Lu.LNU_LAND_UNIT_UNIQUE_NUM = pca.CENTROID_ID and
    14:38:50 12 pa.AREA_ID = pca.AREA_ID and
    14:38:50 13 pca.DELETE_DATE IS NULL and
    14:38:50 14 pa.DELETE_DATE IS NULL;
    is
    Plan Table
    | Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
    | SELECT STATEMENT | | 4G|32920G| 547M| | |
    | NESTED LOOPS | | 4G|32920G| 547M| | |
    | MERGE JOIN | | 547M| 2029G| 230124 | | |
    | SORT JOIN | | 1M| 36M| 85014 | | |
    | MERGE JOIN | | 1M| 36M| 50019 | | |
    | SORT JOIN | | 1M| 17M| 21650 | | |
    | TABLE ACCESS FULL |TP$_PARCE | 1M| 17M| 485 | | |
    | SORT JOIN | | 1M| 22M| 28369 | | |
    | TABLE ACCESS FULL |TDCR_LAND | 1M| 22M| 2127 | | |
    | SORT JOIN | | 42K| 160M| 145111 | | |
    | TABLE ACCESS FULL |TP$_PARCE | 42K| 160M| 12697 | | |
    | TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
    14:43:14 [email protected]:SQL> explain plan for
    14:43:23 2 SELECT pa.AREA_ID
    14:43:23 3 FROM seventy.PARCEL_OVERLAPS po,
    14:43:23 4 imap_topol.TP$_PARCEL_AREAS pa
    14:43:23 5 WHERE SDO_RELATE(po.geometry, pa.area,'mask=ANTINTERACT querytype=WINDOW') = 'TRUE'
    14:43:23 6 and pa.DELETE_DATE IS NULL;
    Plan Table
    | Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
    | SELECT STATEMENT | | 6M| 50G| 10M| | |
    | NESTED LOOPS | | 6M| 50G| 10M| | |
    | TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
    | TABLE ACCESS FULL |TP$_PARCE | 850K| 3G| 12697 | | |
    14:45:03 [email protected]:SQL> explain plan for
    14:45:04 2 SELECT pa.AREA_ID
    14:45:05 3 FROM seventy.PARCEL_OVERLAPS po,
    14:45:05 4 imap_topol.TP$_PARCEL_AREAS pa
    14:45:05 5 WHERE SDO_RELATE(pa.area, po.geometry,'mask=ANTINTERACT querytype=WINDOW') = 'TRUE'
    14:45:05 6 and pa.DELETE_DATE IS NULL;
    Plan Table
    | Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
    | SELECT STATEMENT | | 6M| 50G| 863554 | | |
    | NESTED LOOPS | | 6M| 50G| 863554 | | |
    | TABLE ACCESS FULL |TP$_PARCE | 850K| 3G| 12697 | | |
    | TABLE ACCESS FULL |PARCEL_OV | 817 | 3M| 1 | | |
    --------------------------------------------------------------------------------

Maybe you are looking for

  • WiFi on iPhone 5S 7.0.6 keeps dropping WiFi then not reconnecting

    This is my third iPhone, had a 3GS, 4S and now this 5S. While I love my iPhone it is always dropping my WiFi connection at home. I have a Retina Macbook Pro which has zero problems, there's also two 4S's, a 5C and three iPads all connecting no proble

  • Upload list of BP to segmentbuilder in CRM 5.0

    Hello! Please can you help me? I have to upload/ added list of BP to targetgroups in CRM 5.0. And I do not find how to do it. I have always uploaded/ added list of BP to targetgroups in CRM 4.0. Please, I need this information urgently. Thanks, Crist

  • Cant print online word document

    I am having trouble printing an online word document. I have an HP C6380. When I click print the print queue shows as spooling but nothing ever prints. Can anyone help. Thanks.

  • Hierarchy extraction from R/3 Table to BW

    Hi Gurus/All, I need extract the Organizations  Hierarchy  Structure data from R/3 "Z table".Please any one can  give me  the detailed steps to extract the Hierarchy data from R/3 "z table" in to Bw.It is Masterdata extraction and the hierarchy has 5

  • Won't boot with new graphics card

    Hi. I have a Pavilion P7-1058uk with a Cleveland-GL8 motherboard and onboard graphics. I bought a new monitor which has 2560x1440 resolution, greather than the onboard graphics can cope with, so have tried to upgrade with a Gigabyte GT630 card. When