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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: DUPLICATE VALUE CHECK

RE: DUPLICATE VALUE CHECK

From: Koivu, Lisa <lisa.koivu_at_efairfield.com>
Date: Tue, 26 Jun 2001 11:53:20 -0700
Message-ID: <F001.00338A8F.20010626110651@fatcity.com>

Hi Shirish, FWIW:

Function-based index?  Reverse index?  for case II?  Have you considered either of these options to ease the pain of that query?

HTH
Lisa Koivu
Clumsy Ninja-ette (WAaaaaaaaaaaaa!)
Ft. Lauderdale, FL, USA

-----Original Message-----

From:   Shirish Khapre [SMTP:shirish_at_rolta.com]
Sent:   Tuesday, June 26, 2001 11:42 AM
To:     Multiple recipients of list ORACLE-L
Subject:        DUPLICATE VALUE CHECK

Hi all

i have one column in my table (in which daily 100000 rows are added to the table) which has values like

XYZ_A_LO0000_0000001
XYZ_A_LO0000_0000002
XYZ_A_LO0000_0000003
XYZ_A_LO0000_0000004
XYZ_A_LO0000_0000005
XYZ_A_LO0000_0000006
XYZ_A_LO0000_0000007
XYZ_A_LO0000_0000008
XYZ_A_LO0000_0000009


i want to check duplicate values.. there are 2 cases of duplication

Case I :- i am using the following query

select from my_table where rowid not in( select max(rowid) from my_table
group by my_column_name );

i am getting the rows which are duplicate ..

CASE II : - i want to check duplication in last 7 characters(which are actually nos) in my column like

0000001
0000002
0000003....so on....

i am using substr function to get this value and i am checking the values with remaining rows..

but as the table contains nearly 450000(present rowcount) the query is taking lot of time...which i can't afford... the column has index on it.

plz suggest me what to do??

Shirish Khapre, SE Rolta India Ltd.
Off Ph No. (+91) (022) 8326666,8262222,8300568 Ext'n 2730
Minds are like parachutes. They only function when they are open

--

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

Author: Shirish Khapre
  INET: shirish_at_rolta.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 Tue Jun 26 2001 - 13:53:20 CDT

Original text of this message

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