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

Home -> Community -> Mailing Lists -> Oracle-L -> Slow select distinct

Slow select distinct

From: Shaw John-P55297 <P55297_at_motorola.com>
Date: Mon, 29 Apr 2002 13:43:41 -0800
Message-ID: <F001.00452888.20020429134341@fatcity.com>


I got a query that selects a list of addresses based an occurence at that location.
this query comes back in less than 2 seconds without a distinct clause on the concatenated name. When I add the distict clause it takes over 40 seconds. I've tried adjusting various sort area sizes and buffer sizes to see if I can speed this up. Anybody have a clue if there is something in particular that I can check.
8.1.6 on NT rules based. wtihout the distinct clause it brings back about 10,000 records.
select DISTINCT LTRIM(L.STREET_ADDRESS_BEGIN||' '||L.STREET_NAME_PREFIX||' '||L.STREET_NAME||' '||L.STREET_NAME_SUFFIX) WRECKS FROM LOCATION L,
     STREET_REQS SR
WHERE L.ID = SR.ID
  AND L.STREET_NAME IS NOT NULL

  AND SR.TYPE IN ('KED','KAD')
  AND SR.CODE LIKE 'O%'
  AND SR.ORIG_STREET_REQ_ID IS NULL

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Shaw John-P55297
  INET: P55297_at_motorola.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 Mon Apr 29 2002 - 16:43:41 CDT

Original text of this message

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