Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 4th, 2004, 02:22 AM
SeaBird505 SeaBird505 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 25 SeaBird505 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 50 sec
Reputation Power: 0
Speedy DML Operations

Hi !
We have a telephone billing database on Intel Xeon 2.4 GHz system and Oracle 8i. There is one table (holding details of customer's long distance calls) that accumulates over 14 million (100 bytes) record each month. We only need to keep data for 3 months in this table and then delete the oldest i.e. on average there are around 42 million records in this table.

1. Insert Problem
The table is properly indexed so quering is fine but new record insertion is a hell of slow job. There are 330 inserts per second (takes 11 hours to load new data).

2. Delete Problem
Data more than 3 months old is to be deleted. Here I really want speedy execution. Currently it is 450 delets per second(takes 8 hours to delete old data). Is it possable to delete the data without a rollback segment being filled? I don't need rollback feature , i just need speedy deletion.

Any Suggestion/Help shall be highly appreciated.

Thanks!

Reply With Quote
  #2  
Old June 4th, 2004, 11:02 AM
Kraeg Kraeg is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Schaumburg, IL
Posts: 20 Kraeg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
This from another previous thread on a related topic:

Check out "Oracle Performance Tuning" ISBN 1565922379 by Gurry and Corrigan and/or any information you can find regarding partitioned views and parallel queries. Recommends creating several smaller tables seperated by date and creating partitioned view across the tables. This should also help you with a purging strategy as a table with an out-of-date range can be dropped easily and a current table created with only minimal recoding. There is no in-depth discussion on that particular topic in this book, but it is a very good resource for performance tuning at the database, pl/sql and form level in general.

Your inserts and analyze would be much quicker on the smaller tables (1 per month or so). And the delete would be incredibly quicker because you just have to drop the oldest table

Reply With Quote
  #3  
Old June 5th, 2004, 01:39 AM
SeaBird505 SeaBird505 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 25 SeaBird505 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 50 sec
Reputation Power: 0
Thanks for your suggestion Kraeg! I have split the data of this huge table into 3 tables (one for each month, each holds around 14 million records now).

deletion of old data(by dropping the oldest table) is now a few seconds job .

I need to know how do I speed up the inserts (indexes are making them slow but they cann't be removed coz it will slow down the quering).

Reply With Quote
  #4  
Old June 7th, 2004, 02:11 PM
Kraeg Kraeg is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Schaumburg, IL
Posts: 20 Kraeg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If you are doing your inserts as a batch, you could drop the indexes, load your data, then rebuild the indexes.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Speedy DML Operations


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT