Home » RDBMS Server » Performance Tuning » Performance deleting rows
Performance deleting rows [message #176282] Wed, 07 June 2006 12:25 Go to next message
Nau
Messages: 24
Registered: October 2004
Junior Member
Hi,

I'm looking for a way of deleting rows quicker than the delete dml sentence.
I know truncate sentences, but i don't want to truncate a table or a partition, I want to delete a great number of rows (identified by a where clause), but not a whole partition or table.

For example, inserting rows i can use insert sentences or i can use sql-loader, żis there something similar deleting rows??

My problem is deleting time.

Any advice will be greatly apreciatted. Thanks in advance

Juan



Re: Performance deleting rows [message #176283 is a reply to message #176282] Wed, 07 June 2006 12:43 Go to previous messageGo to next message
jrich
Messages: 35
Registered: February 2006
Member
If you are deleting a large % of a table, you might consider copying the rows you want to keep to a new table using CTAS, then doing renames to replace the old table with the new. This can be a little tricky if foreign key constraints are involved, but it is definitely a time saver in some situations.

JR
Re: Performance deleting rows [message #176502 is a reply to message #176283] Thu, 08 June 2006 09:37 Go to previous messageGo to next message
Nau
Messages: 24
Registered: October 2004
Junior Member
Thanks for yor answer

What about parallel dml??

Has anybody work with parallel deletes?? (/*+ PARALLEL (t2,2) */)
Re: Performance deleting rows [message #181878 is a reply to message #176282] Wed, 12 July 2006 01:26 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
How about dropping and recreating the table? Be carefull!
truncate table <talename>; is the fastest way, and it leaves the structure intact.
Re: Performance deleting rows [message #181965 is a reply to message #176282] Wed, 12 July 2006 06:43 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Question is been asked many times.
Please search before posting.
http://www.orafaq.com/forum/m/167436/42800/?srch=delete+large+data#msg_167436
http://www.orafaq.com/forum/t/51172/0/
Re: Performance deleting rows [message #182029 is a reply to message #176282] Wed, 12 July 2006 11:35 Go to previous message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
Mahesh Rajendran is a really top notch DBA. I get a lot of information looking at his answers.
Neil.
Previous Topic: Help to split query
Next Topic: Performance Issue
Goto Forum:
  


Current Time: Sat Nov 23 12:39:48 CST 2024