Home » SQL & PL/SQL » SQL & PL/SQL » System hang (SQL,9.2.0.8.0,XP)
System hang [message #346271] Mon, 08 September 2008 00:57 Go to next message
gozuhair
Messages: 206
Registered: January 2008
Senior Member
Dear All

I want to delete duplicate rows from my table but when i try to delete duplicate rows by using the following query ,my system hang out and give no response.
delete from h_ope_mst1
where rowid not in
(
select min(rowid)
from h_ope_mst1
group by ope_cd,ope_nm);



Please suggest
Re: System hang [message #346272 is a reply to message #346271] Mon, 08 September 2008 00:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
It does not hang it is just working.
Activate a trace and you will see what it does.

Regards
Michel
Re: System hang [message #346274 is a reply to message #346272] Mon, 08 September 2008 01:04 Go to previous messageGo to next message
gozuhair
Messages: 206
Registered: January 2008
Senior Member
i have execetued the query for a last 2 hour but no response,is there any other query that is easy to execute and take little time.
Re: System hang [message #346280 is a reply to message #346274] Mon, 08 September 2008 01:14 Go to previous message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
"Little" time surely not, it depends on the number of rows and so on.
Less time surely, once again it depends on your environment.
You can:
* use analytical functions
* use index
* create a constraint with exception table
* ...
But deleting duplicates is a question that have been answered about one million times, so you can find the answer.

Regards
Michel
Previous Topic: Delete Cascade, Triggers and Mutating errors
Next Topic: Diff b/w DD-Mon-YY and DD-Mon-RR
Goto Forum:
  


Current Time: Mon Dec 09 21:08:41 CST 2024