Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Query taking a long time while running in Java application

Query taking a long time while running in Java application

From: Krishnaswamy, Ranganath <Ranganath.Krishnaswamy_at_blr.hpsglobal.com>
Date: Fri, 11 Apr 2003 07:59:05 -0800
Message-ID: <F001.0057F9A8.20030411075905@fatcity.com>


Hi List,

        The below query is taking a long time to execute from the Java application and when doing a record count from TOAD. Is there any way I can rewrite the below query?

SELECT

  A0.ID ID0,
  A0.SEG_GRP GRP0,
  A1.ID ID1,
  A1.SEG_GRP GRP1,
  A2.ID ID2,
  A2.SEG_GRP GRP2,
  A3.ID ID3,
  A3.SEG_GRP GRP3

FROM
  ROUTE_BUILD A0,
  ROUTE_BUILD A1,
  ROUTE_BUILD A2,
  ROUTE_BUILD A3

WHERE
  A0.REQUEST_ID=1943 AND
  A1.REQUEST_ID = 1943 AND
  A2.REQUEST_ID = 1943 AND
  A3.REQUEST_ID = 1943 AND

(NVL(A0.SEG_TOA + (( SELECT TRANSFER_TIME FROM AIRLINE_TRANSFER_TIME WHERE
STN_KEY=A1.ORG_KEY AND
  FROM_AIRLINE_KEY=A0.AIRLINE_KEY AND
  TO_AIRLINE_KEY=A1.AIRLINE_KEY AND
  SERVICE_KEY=1)/(24*60)),A0.SEG_TOA) < A1.SEG_LAT) and   A0.SEG_GRP = A1.SEG_GRP-1 AND
(NVL(A1.SEG_TOA +(( SELECT TRANSFER_TIME FROM AIRLINE_TRANSFER_TIME WHERE
STN_KEY=A2.ORG_KEY AND
  FROM_AIRLINE_KEY=A1.AIRLINE_KEY AND
  TO_AIRLINE_KEY=A2.AIRLINE_KEY AND
  SERVICE_KEY=1)/(24*60)),A1.SEG_TOA) < A2.SEG_LAT) AND   A1.SEG_GRP = A2.SEG_GRP-1 AND
(NVL(A2.SEG_TOA +(( SELECT TRANSFER_TIME FROM AIRLINE_TRANSFER_TIME WHERE
STN_KEY=A3.ORG_KEY AND
  FROM_AIRLINE_KEY=A2.AIRLINE_KEY AND
  TO_AIRLINE_KEY=A3.AIRLINE_KEY AND
  SERVICE_KEY=1)/(24*60)),A2.SEG_TOA) < A3.SEG_LAT) AND   A2.SEG_GRP = A3.SEG_GRP-1 Any help in this regard is very much appreciated.

Thanks and Regards,

Ranganath   

WARNING: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Krishnaswamy, Ranganath
  INET: Ranganath.Krishnaswamy_at_blr.hpsglobal.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Apr 11 2003 - 10:59:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US