Home » RDBMS Server » Performance Tuning » Purgeing data (9i and 10g)
Purgeing data [message #357297] Tue, 04 November 2008 14:18 Go to next message
jack00423
Messages: 4
Registered: July 2008
Junior Member
1-Can we purge data based on users(criteria) and time(from todate)?
2-if yes,Could you please tell how to do that.
Re: Purgeing data [message #357298 is a reply to message #357297] Tue, 04 November 2008 14:24 Go to previous messageGo to next message
Michel Cadot
Messages: 64119
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ Yes if you have the information for this
2/ Using the information on these parameters.

Regards
Michel
Re: Purgeing data [message #357300 is a reply to message #357298] Tue, 04 November 2008 14:30 Go to previous messageGo to next message
jack00423
Messages: 4
Registered: July 2008
Junior Member
Hi,
Please tell me how to do that (any docs or notes for this)
Explain in detail please.How to specify the parameters for this ?
Thanks
Jack

[Updated on: Tue, 04 November 2008 14:33]

Report message to a moderator

Re: Purgeing data [message #357312 is a reply to message #357300] Tue, 04 November 2008 19:26 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
It's not automated. You cannot specify a row to have a "default lifespan" after which it self-deletes.

If you want to remove data, you write code to:
- DELETE rows
- TRUNCATE tables or partitions
- DROP tables or partitions

Once you have written the code, you can schedule it to run automatically with DBMS_SCHEDULER()

Ross Leishman
Re: Purgeing data [message #357315 is a reply to message #357297] Tue, 04 November 2008 19:35 Go to previous message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
although you cannot create a row that will automagically delete itself after some period of time, you can create a view on top of your data that will stop showing the row after a specified period of time. Simply store the expiration date and code a where clause in the view to not show the row when sysdate <= expiration date.

Maybe this will suite your needs?

Kevin
Previous Topic: Query Tuning
Next Topic: Dirty database_Performance issues
Goto Forum:
  


Current Time: Tue Dec 06 06:14:54 CST 2016

Total time taken to generate the page: 0.14586 seconds