-
Do we have any other alternative instead of distinct to remove the duplicates in the result of a query;
The other possibilities, I figured out is group by and union can remove the duplicate rows. But, any of these methods will take so long to operate on a table with the size of around 5000 records and having the join conditions.
The query that I have is as
SELECT
p.elemid portid,
p.alarmportkey portname,
p.servicetype,
ece.contbyelem parentelemid,
e2.alarmPCIDKey parentelemName
FROM
pport p,
elemcontelem ece,
element e2
WHERE
ece.contbyelem IN
(SELECT
contbyelem
FROM
elemcontelem
connect by prior contbyelem=elemid
start with elemid = p.elemid) and
p.elemid != ece.elemid AND
e2.elemid = ece.contbyelem;
This query taking at a minimum of 2-3 hrs to fetch records. But the result is having lot of duplicate records in it:
Can any body help me, Thanks in advance
--Srinivas.
-
Hi Srinivas:
mail me in little brief. what u want to achieve.
mallika_ind@yahoo.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|