What is the best strategy to purge a set of database tables.

Hi,
I have 6 tables I would require to purge data from.
1 parent table - All of the data that needs to be purged are from a partition created on this table
5 child table - Using the parent record identifier, these records needs to be purged as well.
The count of the parent table that i would be purging is around 6 * 10^6
and the child tables contain atleast 12 * 10^6.
Can some 1 let me know the most efficient way to get this done.
If i am using delete statements - if there are any oracle hints that would speed up the process.
Are there any alternatives to execute a delete script versus how a dba can help out getting the same done within the shortest period of time possible?

Welcome to the forum.
Are all tables partitioned?
What database version are you working with?
Dropping partitions sounds like a good option you have.
But there are several other ways, like create table as select [records you want to keep].
Even DBMS_REDEFINITION pops into my mind...
These threads will give you more ideas: http://asktom.oracle.com/pls/asktom/asktom.search?p_string=%22mass+delete%22

Similar Messages

  • What is the best strategy to save a file in client computer

    I want to save some information in a file in client computer. What is the best strategy to do? There are some ways I can think about. But none of them is good enough for me.
    1. I gave all-permission. So, I can actually write what I want. But, in order to make the program runs on all platform/all client computers, I can't make any assumptions on file system of client computer. So, this is not good.
    2. I can write a file into .javaws directory. But, how can I get file path for this directory? JNLP API does not give this path to us. I can't think a way to get this path for all client computer (WIndown, Mac, Unix).
    3. To write as a muffin. Seems fine. But, I often change server and path. So, once I changed server, the client will loss the file saved since muffin is associated with server and path.
    4. I can just open one file with on path. I think J2SE will treat this file platform dependently. For example, for W2K this file will be put into Desktop. This is bad.
    Any better idea?

    In the past I have used the Properties class to do things like this. Using load and store, you can read and write key=value pairs.
    I store the file in the user.home directory. You can use System.getProperty("user.home") to get this location.
    No guarantees, but I thought that this user.home property was good for any OS with a home directory concept. If that turns out not to be true, maybe the System property java.io.tmpdir would be more consistent across platforms. This, of course, would be subject to delete by the OS/administrators.
    -Dave

  • What's the best strategy to implement ads?

    Hello Everyone,
    I’ve inherited a site as the content manager and the
    owners would like to start selling ad space on certain pages.
    Mostly the ad banners will be on the either side of the web pages.
    To see the site with out signing-up this page is public:
    http://www.kidstylesource.com/industry/index.php?option=com_content&task=blogcategory&id=2 7&Itemid=91
    The site is built with Joomla and Dreamweaver. The site is
    fairly removed from the Joomla structure that Dreamweaver will be
    playing a big part here setting up ad banner areas. Joomla has
    it’s own way of running ad banners but as mentioned
    it’s very removed from the Joomla way.
    I’m just wondering what is the best strategy to
    implement the ads with placement on the page, tables and/or div
    with out doing a whole rewrite of each page? The body of the pages
    are a mix of tables and div.
    Also I’d like to think about the future using an ad
    server as I’ve never used one before and don’t know
    what code/structure the ad server is expecting on the website. At
    this time the website is just getting off the ground so I feel an
    ad server is not necessary until traffic picks-up.
    Many Thanks,
    John V.

    Hi Helen,
    Are Form1, Form2 etc five different pages? Are they based on different tables?
    Typically, a tree would be a heirarchical structure (child, parent, grandparent etc) - your structure is more like a simple list.
    Also typically, a report is used as the front-end to a form. A link on the report would move the user to a form that allows them to insert/update/delete data. If the five "forms" are based on different data, I would have five tabs in your app - one for each - and have the front-end report as the main page for each tab.
    Or, perhaps, I'm reading your requirement wrong?
    Andy

  • What is the best strategy to use both Z10 and Q10?

    Assume I have both a Z10 and Q10 and I'd like to use it on alternate days, what's the best strategy to do so?
    BBM should be fine with the same BlackBerry ID and it can just keep switching between the 2 devices.
    If I am using local contacts and calendars, is there an easy switch to keep them sync on both Z10 and Q10?
    There are also other information to sync in Password Keeper, Remember...etc.
    Is there a solution?

    Hello,
    For calendar and contacts, there is this:
    http://supportforums.blackberry.com/t5/BlackBerry-Q10/How-To-OTA-Sync-BB10-and-non-BES-Outlook-Overv...
    With that, I actually keep all of the following in sync:
    Two instances of Desktop Outlook (2007 and 2010)
    Z10
    PlayBook
    Outlook.com
    And, before I decommissioned it, also an Android device. Any device that can synchronize with Outlook.com can use this solution to keep in sync for calendar and contacts. You, of course, need to not use solely local contacts and calendar but instead keep them synchronizing with Outlook.com.
    For the other things you mention, I know of no solutions other than backup/restore...but I do not recall if LINK offers the selective method for those.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Need help editing for 14:9 broadcast -- what's the best strategy?

    Hi,
    I work for a station which broadcasts in 14:9. I can cope easily with this when using full screen images by visualising, roughly, what will be lost on the left and right. But now I want to use split-screens and image collages using smaller, scaled down pictures, and want to be able to design the material precisely within a 14:9 frame so that none of the material is lost.
    What's the best strategy for this? Is there a cartesian co-ordinate I shouldn't stray beyond -- or better, is there an easy way with a mask, perhaps, to show 14:9 within a 16:9 timeline. (I'll be editing with a 16:9 timeline). Can I somehow create two vertical lines to visually provide the limits of the 14 component of the aspect?
    Many thanks for any help.
    macbook pro   Mac OS X (10.4.7)  

    Well, you could certainly create a mask in PhotoShop that is 720x480 wide, but has a 630x480 hole in it. Then bring it in and set its anamorphic flag and put it on the top Video layer to see a 14:9 window.
    I arrived at 630 by multiplying 720x14 and dividing the result by 16...
    Patrick

  • What is the best form to control a open of database?

    Hi,
    what is the best form to open a database?
    I´m understood that Environment is unique for all aplication, and I think that it is good to put on Singleton Pattern, but I don´t know the best form to do it with the databases.
    I think two forms, the first is create a singleton open database, with this form I don´t will close the database and all application will use it. So, the second form is open a data base at the moment that I will use it, for example, into a DAO when I will do inserts, deletes, etc, and at the final of the operation I close the database.
    So, I don´t know what form is the best, and if those forms are corrects, if exist another form to do it I would like to know.

    Hugo,
    An application can choose to use one or more Environment and Database instances in a single process. In other words, it is the application's choice whether it wants to instantiate a single Environment or Database and share it among multiple threads, or whether it wants to instantiate multiple instances.
    Choosing one pattern or another is a function of your application's design, and performance considerations. As you say, you could instantiate a single Database instance and pass it around, or you could open and close the Database every time you get a data record. A third choice is to open a Database instance per thread, and reuse that for the life of the application.
    The second choice of opening and closing the Database per data record access is pretty heavyweight from a performance point of view. There is a fair bit of overhead to the initial open of a database, and to the final close. Follow-on opens are not as heavyweight, but do have some cost. For example:
    // expensive
    thread 1 calls Environment.openDatabase() or new EntityStore()
    // less expensive, database is already open, thread 2 is really just getting a handle
    // onto the database, but still more expensive than a read or write of a data record
    thread 2 calls Environment.openDatabase() or new EntityStore()
    The first choice of using a single Database instance in your process will perform much better. If your application has a high level of concurrency, there can be some contention on the Database instance, described in this FAQ - http://www.oracle.com/technology/products/berkeley-db/faq/je_faq.html#32 and you may prefer to try the third option of using a Database instance per thread.
    Regards,
    Linda

  • What is the best practice for inserting (unique) rows into a table containing key columns constraint where source may contain duplicate (already existing) rows?

    My final data table contains a two key columns unique key constraint.  I insert data into this table from a daily capture table (which also contains the two columns that make up the key in the final data table but are not constrained
    (not unique) in the daily capture table).  I don't want to insert rows from daily capture which already exists in final data table (based on the two key columns).  Currently, what I do is to select * into a #temp table from the join
    of daily capture and final data tables on these two key columns.  Then I delete the rows in the daily capture table which match the #temp table.  Then I insert the remaining rows from daily capture into the final data table. 
    Would it be possible to simplify this process by using an Instead Of trigger in the final table and just insert directly from the daily capture table?  How would this look?
    What is the best practice for inserting unique (new) rows and ignoring duplicate rows (rows that already exist in both the daily capture and final data tables) in my particular operation?
    Rich P

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> My final data table contains a two key columns unique key constraint. [unh? one two-column key or two one column keys? Sure wish you posted DDL] I insert data into this table from a daily capture table (which also contains the two columns that make
    up the key in the final data table but are not constrained (not unique) in the daily capture table). <<
    Then the "capture table" is not a table at all! Remember the fist day of your RDBMS class? A table has to have a key.  You need to fix this error. What ETL tool do you use? 
    >> I don't want to insert rows from daily capture which already exists in final data table (based on the two key columns). <<
    MERGE statement; Google it. And do not use temp tables. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • What is the best practice for creating primary key on fact table?

    what is the best practice for primary key on fact table?
    1. Using composite key
    2. Create a surrogate key
    3. No primary key
    In document, i can only find "From a modeling standpoint, the primary key of the fact table is usually a composite key that is made up of all of its foreign keys."
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/logical.htm#i1006423
    I also found a relevant thread states that primary key on fact table is necessary.
    Primary Key on Fact Table.
    But, if no business requires the uniqueness of the records and there is no materilized view, do we still need primary key? is there any other bad affect if there is no primary key on fact table? and any benifits from not creating primary key?

    Well, natural combination of dimensions connected to the fact would be a natural primary key and it would be composite.
    Having an artificial PK might simplify things a bit.
    Having no PK leads to a major mess. Fact should represent a business transaction, or some general event. If you're loading data you want to be able to identify the records that are processed. Also without PK if you forget to make an unique key the access to this fact table will be slow. Plus, having no PK will mean that if you want to used different tools, like Data Modeller in Jbuilder or OWB insert / update functionality it won't function, since there's no PK. Defining a PK for every table is a good practice. Not defining PK is asking for a load of problems, from performance to functionality and data quality.
    Edited by: Cortanamo on 16.12.2010 07:12

  • What is the best way is to implement a friend database

    Hi
    I was wondering what the best way is to implement a friend database. E.g. facebook where a person can have friends.
    Would you create a person table and a friendtable where each entry in the friendtable contains the owners personid and the friends personid?
    I would like to to view the picture of Darwin Cabigas Cano?
    Please..

    We call it as Database Design.
    Yes, you can have one table as Person and Friends table which should refer to your Person table.
    It should look like below: (Reference:
    Facebook Style Friend Request System Database Design )
    -Vaibhav Chaudhari

  • What is the best way of selecting 99 colums from a table with 100 colums?

    Hi All,
    Suppose in a table T, I have 100 colums .I want to select 99 columns.So what is the best way to do the same?
    Anyone Help!
    Thanx in advance.
    Piyush

    Try this
    SQL> ed
    Wrote file afiedt.buf
      1  select column_name ||',
      2  ' from user_tab_columns
      3  where
      4     table_name = 'EMP'
      5*    and column_name not like 'EMPNO'
    SQL> /
    COLUMN_NAME||','
    ENAME,
    JOB,
    MGR,
    HIREDATE,
    SAL,
    COMM,
    DEPTNO,
    7 rows selected.
    SQL>

  • What is the best font to be used in graphs and tables?

    I want to know what is the best font (or the most used) for discoverer10g graphs and tables.
    I used Arial, Dialog, Veranda, 7, 8, 9 but it seems that there is a space between letters especially on the graph. I’m looking for a font that does not have this space between letters.
    Any help will be appreciated.

    Hi,
    Any font holds good,depends on the choice of the individual user.
    neways go through this link http://docs.tpu.ru/docs/oracle/en/oas/9.0.4.0.0/bi.904/b10268/intro_gr.htm#1026899
    Hope this helps you!!
    Regards,
    Kranthi

  • What is the best strategy to back up to a USB drive?

    Hi All
    I am going to buy a USB drive for backup and have a few questions that might have been worked out by others.  These drives come pre-formatted with vfat.  My first inclination would be to use rsync to perform the backup but vfat can't hold all of the permissions, ownership, etc. that are required.   I think I would end up in trouble with tar as well.  Ultimately, the tar file would be too large.  Thus, I guess I would have to break it up somehow.  Anyways, is there a good strategy for performing such a backup?
    Thanks
    Kev
    Last edited by iKevin (2007-02-11 14:48:06)

    How about manual? :-)
    Permissions
    Synchronizing the permission bits of files is slightly tricky when two different filesytems are involved (e.g., when synchronizing a Windows client and a Unix server). In detail, here's how it works:
    When the permission bits of an existing file or directory are changed, the values of those bits that make sense on both operating systems will be propagated to the other replica. The other bits will not be changed.
    When a newly created file is propagated to a remote replica, the permission bits that make sense in both operating systems are also propagated. The values of the other bits are set to default values (they are taken from the current umask, if the receiving host is a Unix system).
    For security reasons, the Unix setuid and setgid bits are not propagated.
    The Unix owner and group ids are not propagated. (What would this mean, in general?) All files are created with the owner and group of the server process.
    EDIT:
    I'd suggest reading this and/or this and/or this first to find which backup system is the best for you.
    There are many programs which should work in your case you and many "meta" systems that should make it easier to configure (like backupninja for example).
    I think you should also reconsider using vfat. It's not the best choice for a backup system. Ext3 would do much better and make it much simplier. You can always reformat the hd back to vfat under linux. For large hds it's actually easier to do that under linux (XP has a 35 GB limit when formatting vfat partitions...).
    Last edited by lanrat (2007-02-13 13:50:34)

  • What is the best strategy for wireless printing?

    Hi,
    I just got an HP 6500A wireless all in one printer and have it connected by ethernet cable to our wireless router. My desktop running Vista Home Premium is also connected to the router. Printing from the desktop works fine. We also want to print wirelessly from a couple of Windows laptops, an iPhone and an iPad. I installed HP's Mobile E-print driver on the laptops and it works but I think the size limitation (5 mb) is a problem. I couldn't print a single page pdf, but a Word doc printed fine.
    So, it looks like I could:
    A: Connect the printer to the desktop by USB and share the printer on the network. Possible drawbacks - I think I'd have to leave the desktop on all the time and we haven't had much success sharing our old HP printer.
    B: Install the printer on the network, via ethernet, and use the embedded web server. Then I guess I install the printer software on each computer?
    C: Connect the printer wirelessly. Is this any different from option B other than not using a cable? The printer is located near the router and the desktop so the cable isn't a problem.
    I know it may just come down to individual preference, but I'd be grateful for any advice as to which direction to go!
    Thanks.
    Dirt Gardener
    This question was solved.
    View Solution.

    A is not a great solution.  Printer sharing USB printers have so many downsides, some of which you described.  In addition, only printing can be shared, not scanning or faxing.
    I like B the best.  Ethernet is superior to wireless if you can connect that way - no passwords, no interference and it is generally a faster interface.  Install the printer software on each computer (from the "Support & Drivers" link at the top of this page, not a CD).
    C is OK, but only if you cannot connect by Ethernet.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • What is the best approach to handle multiple FK with single table.

    If two tables are joined with each other with more than one ways, for example
    MAIN table is (col1, col2,....coln, person_creator_id, person_modifier_id)
    PERSON table is (person_id, name, address,........ phone) etc
    At database level PERSON_CREATOR_FK and PERSON_MODIFIER_FK are defined.
    Objective is to create a report that shows
    col1, col2...coln, person creator name, person modifier name
    If above two objects are imported with FKs in a EUL and discoverer plus is used to create above report. On first inclusion of person name discoverer plus will ask you to pick the join (provided the checkbox to disable this feature is not checked). Once you pick 'person creator' join it will never allow you to pick person modifier name.
    One solution is two create a custom folder with query like
    select col1, col2,...coln,
    pc.name, pc.address,.... pc.phone
    pm.name, pm.address,.... pm.phone
    from main m,
    person pc,
    person pm
    where m.person_id_creator = pc.person_id
    and m.person_id_modifier = pm.person_id
    Second solution is to import the PERSON folder twice in EUL (optionally named one as perosn_creator and other as person_modifier) and manually define one join per table. i.e. join MAIN with PERSON_CREATOR on person_creator_fk and join MAIN with PERSON_MODIFIER table using person_modifier_fk.
    Now discoverer plus will let you drag Name from each person folder without needing to resolve multiple joins.
    Question is, what approach is better OR is there a better way?
    With solution 1 you will not be able to use functions on folder items.
    With solution 2 there is a EUL design overhead of including same object multiple times and then manually defining all join (or deleting unwanted joins), and this could be a problem when you have person_modifier and person_creator in nearly all tables. It could be more complicated if person table is further linked other tables and users want to see that information too. (for instance, if person address is stored in LOCATION table joined with location_id and user want to see both creator address and modifier address....now you will have to create multiple LOCATION folders).
    A third solution could be to register a function in discoverer that return person name when person_id is passed. This will work perfectly for above requirement but a down side is the report will run slower if they need filters on person names (then function will be used in where clause). Also, this solution is very specific to above scenario, it will not work if you want the report developer the freedom to pick any attribute from person table (lets say, person table contain 50 attributes then its not a good idea to register 50 functions).
    Any comments/suggestion will be appreciated.
    thanks

    Hi
    In a roundabout way you have really answered your own question :-)
    In my opinion, the best approach, although by all means not the only approach - see below) would be to have the object loaded as two folders with one join going to the first folder and the second join to the other folder. You would of course name the folders appropriately.
    Here's a workflow that I use all of the time and one that I teach when I'm giving Discoverer Administrator training. It might help you:
    1. Bring in the PERSON folder to begin with
    2. Make all necessary adjustments to bring it up to deployment standard. These adjustments would be: folder name (E.g PERSON_CREATOR), item names, item placement, default positions, default aggregation and so on.
    3. Create or assign the required lists of values
    4. Create any required calculations
    5. Create any required conditions
    6. Create the first join from this folder to MAIN.
    7. Click on the heading for the folder and press CTRL-C.
    8. Click on the heading for the business area and press CTRL-V. A second copy of the folder, complete with all of the adjustments you made earlier will be inserted into the business area.
    Note: joins are not copied, everything else is.
    9. Rename this folder to say PERSON_MODIFIED
    10. Rename the items as appropriate
    11. Add a join from this folder to MAIN - you're done
    Other ideas that I have used and work well would be to use a database view or create a complex folder. Either will work, In both cases you would need to join on some other column other than the ones you referred earlier.
    I hope this helps
    Best wishes
    Michael

  • What are the best security practices for your forms and databases

    What are some of the best security practices to follow to
    ensure your database isn't attacked with injections, forms abused
    with snippets of code, and mass spam DB inserts on your
    forms?

    On Sat, 29 Mar 2008 17:17:01 +0000 (UTC), "jsteinmann"
    <[email protected]> wrote:
    >What are some of the best security practices to follow to
    ensure your database isn't attacked with injections, forms abused
    with snippets of code, and mass spam DB inserts on your forms?
    David Powers books on php for Dw give detailed advice on how
    to do
    forms, first with html, and then validate them with secure
    php
    scripts.
    http://foundationphp.com/
    ~Malcolm N....
    ~

Maybe you are looking for

  • CCMS configuration question - more than one sapccmsr agent on one server

    Hello all, this might be a newbie question, please excuse: We have several SAP systems installed on AIX in several LPARs. SAP aplication server and SAP database is always located in different LPARs, but one LPAR can share application server of severa

  • Dirty paint

    Hello everybody. I've coded a little programm which displays some figure when I click on a button. But I have a little problem with the "dirty painting". here 's my code : import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax

  • Ipad 3 version hotspot

    Where do I find the option to make my ipad 3 a hot spot? I have a 64GB iPad3 with a verzion celluar plan. I do not see the setting in the settings menu at all.

  • Single heading for multiple heading

    Hi Experts, I have to display an alv ,in this i require to put different heading (not alv header) to three different group of fields and  each group contains more than 6  to 8 columns under it , how to this??? eg i have to display     local sales tax

  • JSR-168 Support

    Do we have any plans to resume support for JSR-168 portlets to extend integration with other portal platforms besides WCI and WLP?