Problem with a mass delete operation

Hello,
This questions concerns Oracle v10g.
A table is used to record user login information and other connection related details such as IP address, date of connection, time of login, time of logout etc. from a web-based application.
This table becomes quite large (3 million records+) and is purged once per month of all records older than 3 days old.
The purge is done with a simple delete based on the date of connection CDAT and the column DISX (disconnection=True/False)
DELETE FROM LOGTAB where CDAT < sysdate-3 and DISX='T';The columns CDAT and DISX are indexed. This delete operation can tale up to 10 minutes.
Sporadic problems arise during this delete operation when users connect or disconnect : for those users trying to disconnect, the resulting UPDATE operation on the table currently being deleted seems to hang.
For the users trying to login, there can be a delay (as the INSERT is in suspense). In the worst case all sessions become blocked until the DELETE is finally commited thus rendering any connection impossible for the duration.
There is no conflict between the data being deleted and the data being UPDATED or INSERTED.
The DELETE should only lock the rows that match the WHERE clause, so where is the contention arising from? Could this be index contention?
Is there a better way to manage such mass deletes on such high transaction tables? Partitions?
Thank you in advance.

Have you considered partitioning this table? It would of course depend on whether most queries are looking at the columns you mention, but it would mean you could truncate the partitions older than 3 days ...
create table LOGTAB
(   cdat        date not null,
    disx        varchar2(1) not null,
    col1        varchar2(100)
PARTITION BY RANGE (cdat)
SUBPARTITION BY LIST (disx)
SUBPARTITION TEMPLATE
    (   SUBPARTITION sptn_T VALUES('T'),
        SUBPARTITION sptn_Default VALUES(DEFAULT)
(   PARTITION ptn_20110808 VALUES LESS THAN (TO_DATE('09/08/2011','dd/mm/yyyy')),
    PARTITION ptn_20110809 VALUES LESS THAN (TO_DATE('10/08/2011','dd/mm/yyyy')),
    PARTITION ptn_20110810 VALUES LESS THAN (TO_DATE('11/08/2011','dd/mm/yyyy')),
    PARTITION ptn_20110811 VALUES LESS THAN (TO_DATE('12/08/2011','dd/mm/yyyy')),
    PARTITION ptn_MaxValue VALUES LESS THAN (MAXVALUE)
insert
into
    LOGTAB
SELECT
    TO_DATE('08/08/2011','dd/mm/yyyy'),
    CASE
        WHEN mod(rownum,2)=0 THEN
            'T'
        ELSE
            'S'
    END,
    'Blah'
FROM
    dual
CONNECT BY
    LEVEL <= 10
insert
into
    LOGTAB
SELECT
    TO_DATE('09/08/2011','dd/mm/yyyy'),
    CASE
        WHEN mod(rownum,2)=0 THEN
            'T'
        ELSE
            'S'
    END,
    'Blah'
FROM
    dual
CONNECT BY
    LEVEL <= 10
insert
into
    LOGTAB
SELECT
    TO_DATE('10/08/2011','dd/mm/yyyy'),
    CASE
        WHEN mod(rownum,2)=0 THEN
            'T'
        ELSE
            'S'
    END,
    'Blah'
FROM
    dual
CONNECT BY
    LEVEL <= 10
insert
into
    LOGTAB
SELECT
    TO_DATE('11/08/2011','dd/mm/yyyy'),
    CASE
        WHEN mod(rownum,2)=0 THEN
            'T'
        ELSE
            'S'
    END,
    'Blah'
FROM
    dual
CONNECT BY
    LEVEL <= 10
SQL> select * from logtab where cdat=to_date('08/08/2011','dd/mm/yyyy');
CDAT      D COL1
08-AUG-11 T Blah
08-AUG-11 T Blah
08-AUG-11 T Blah
08-AUG-11 T Blah
08-AUG-11 T Blah
08-AUG-11 S Blah
08-AUG-11 S Blah
08-AUG-11 S Blah
08-AUG-11 S Blah
08-AUG-11 S Blah
SQL> select table_name,partition_name,subpartition_name from user_tab_subpartitions;
TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME
LOGTAB                         PTN_20110808                   PTN_20110808_SPTN_DEFAULT
LOGTAB                         PTN_20110808                   PTN_20110808_SPTN_T
LOGTAB                         PTN_20110809                   PTN_20110809_SPTN_DEFAULT
LOGTAB                         PTN_20110809                   PTN_20110809_SPTN_T
LOGTAB                         PTN_20110810                   PTN_20110810_SPTN_DEFAULT
LOGTAB                         PTN_20110810                   PTN_20110810_SPTN_T
LOGTAB                         PTN_20110811                   PTN_20110811_SPTN_DEFAULT
LOGTAB                         PTN_20110811                   PTN_20110811_SPTN_T
LOGTAB                         PTN_MAXVALUE                   PTN_MAXVALUE_SPTN_DEFAULT
LOGTAB                         PTN_MAXVALUE                   PTN_MAXVALUE_SPTN_T
10 rows selected.
SQL> alter table logtab truncate subpartition PTN_20110808_SPTN_T;
Table truncated.
Elapsed: 00:00:00.03
SQL> select * from logtab where cdat=to_date('08/08/2011','dd/mm/yyyy');
CDAT      D COL1
08-AUG-11 S Blah
08-AUG-11 S Blah
08-AUG-11 S Blah
08-AUG-11 S Blah
08-AUG-11 S Blah
Elapsed: 00:00:00.00Not sure if it's suitable for you or not but it could be an option...
HTH
David

Similar Messages

  • I have problems with activation, after delete mi Iphone from Icloud.

    I have problems with activation, after delete mi Iphone from Icloud.

    Hello Sikiz 21,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iPhone: Troubleshooting activation issues
    http://support.apple.com/kb/TS3424
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Best of luck,
    Mario

  • Problem with multi row delete

    Hi, I'm new in apex and I tried to build master detail report on some view. Everything is cool but "delete checked" doesn't work.
    "ORA-20001: Error in multi row delete operation: row= , ORA-06502: PL/SQL: numeric or value error: NULL index table key value,"
    the problem is that I don't know what is wrong :), I have a special trigger "instead of delete on MY_VIEW", but in this error problem is not explained.
    Anybody knows what can be wrong? It is probably a problem with trigger or multi row doesn't work with views? I couldn't find how MRD knows what kind of statement use to delete rows so I don't know if the statement that program used is correct. In debug it lokks that:
    0.32: ...Do not run process "ApplyMRU", process point=AFTER_SUBMIT, condition type=REQUEST_IN_CONDITION, when button pressed=
    0.32: ...Process "ApplyMRD": MULTI_ROW_DELETE (AFTER_SUBMIT) #OWNER#:MY_VIEW:ITEM1:ITEM2
    0.33: Show ERROR page...
    0.33: Performing rollback...
    thanks for any help
    //sorry for english mistakes
    edit: it doesn't matter if I use in trigger delete from ... where item1=:OLD.item1 ; or if I use item1=:P4_item1 (which actually saves correct values)
    Edited by: user5931224 on 2009-06-13 08:55

    I realised that this is not a problem with trigger, I changed trigger to "NULL;" and problem is the same. Maybe sb used master detail on view not only on tables and know what can be wrong in this situation?

  • Problem with creating and deleting row in table

    Hi
    I'm using JDev11.1.1.2.0. I have a table "A" with primary key X -> CHAR(1). I have created Entity and ViewObject (with the primary key X).
    I created an editable Table with CreateInsert and Delete actions.
    When I click Insert, a new record is added and I enter some data. Then I move selection to some other row, and return back to the new row. When I press Delete, It does not delete the new row, but the previous one selected.
    In the console, when I navigate back two the new added record: <FacesCtrlHierBinding$FacesModel><makeCurrent> ADFv: No row found for rowKey: [oracle.jbo.Key[null ]].
    I tried the same scenario with a different table, that has RowID as a primary key and it works correctly.
    Any Idea why this is happening ? I suppose it's connected somehow with the primary key.
    Thanks
    agruev
    Edited by: a.gruev on Nov 26, 2009 9:47 AM

    I changed my entity: unchecked the X column to be primary key added RowID as a primary key. Now it works.
    What's wrong with my CHAR(1) as a primary key ?
    I also tried to add a Refresh button:
      <af:commandButton text="Refresh" id="cb3"/>and in the table add a partialTarget to the button. Now when I add new row and press the Refresh button - then it works.
    So it seems that the problem is when I add new row and enter data, the table is not refreshed and the row is missing it's primary key.
    Any solutions?
    Edited by: a.gruev on Nov 26, 2009 4:18 PM

  • Problems with contacts getting deleted after software upgrade!

    Somehow, my IPhone 4s had a software upgrade, and it DELETED contacts.  Anyone else have a problem with this????  UGH!
    I had a thunderbolt before my IPhone, and my contacts were saved to the verizon back up assistant.  They are now nowhere to be found!

    If you were already using iOS 5 where you using the iCloud feature to back up your device? If so, you should be able to retrieve your contacts. If you just upgraded to iOS 5 where you backing up your device on your computer via iTunes? You were advised to complete a backup prior to proceeding with the software update...if you did so then a copy of your back up should be available in iTunes. Try looking at the following link to see if it helps:
    http://support.apple.com/kb/ht1414
    If you did not do a backup and you were not using iCloud to do backups then you would need re-sync your contacts from another source...did you use a contact manager on your computer (such as Outlook)? If you did then you can retrieve your contacts from there. Try looking at this link to see if it helps. If it is not the correct one you can do a search on that site to find the article that better fits your needs.
    http://support.apple.com/kb/PH1674

  • Problem with network after deleting NIC teaming.

    We have server HP ProLiant DL360p Gen8 with Windows Server 2012.  Couple months ago I  created a team NIC Teaming (use 2 network interfaces, the other 2 are disable and not connected).  Also NLB (Network Load Balancing) feature was installed
    but not configure (I think it is important). IIS and MS SQL 2012 Express were installed too and anything else
    Now I need delete team NIC Teaming and use network interfaces separately (with different IPs but the same network 192.168.1.0). When I delete team and configure IPv4 with static IP (we don't have DHCP) network does nor work. Because there is no default gateway
    in IPv4 properties. It is problem and I don't know how fix this. When I recover team NIC Teaming - all OK. I checked registry and Gateway is in Interfaces (HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<Adapter
    GUID>)
    I uncheked NLB in network adapter's settings.
    I did
    netsh interface ip reset 
    I checked Route Print  -  0.0.0.0 to 192.168.1.1 is present in single copy.
    I reinstalled drivers network adapter - it fixed problem before restart. After restart the problem recovered :)
    I don't know what should do next.. I cannot resetup OS. Could you please help with this, please. And sorry for my English.
    Best regards,
    Alex.

    Hi ,
    After this please try to check the protocol which bounded properly .
    If it is normal and still can not access outside as you mentioned above  , please try to open the device manager -->
    view --> show hidden devices --> then try to remove all the devices under network adapters
    (I would recommend you to note the driver files' path in the properties of physical NIC in device manager --> tab
    driver --> driver details , try to delete the file after remove the NIC in device manage )
    Then restart your computer , install your NIC driver and retry .
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.
    Well, I fixed problem finally. :) I deleted all network adapters in device manager with driver file. Than I restarted server and Windows Server setuped Microsoft driver. After that all work!  I tried to setup HP driver and problem comes back. I can
    conclude that the problem is in the driver manufacturer. Thanks for all and good luck.

  • Problems with 0EMPLOYEE and deleted employees

    I have 10 employees who's data records have been deleted from the ECC system because they were entered in error.   However they remain in the 0EMPLOYEE info object with an "Active" status even after doing a full load of 0EMPLOYEE from ECC.   This is throwing some reports off as BW thinks these employees are still active.   What is the correct way to handle this problem?

    You can delete them manually. If they were created by error it won't be transactional data for them.

  • Problem with Gmail, Adobe site, Opera, Safari...

    Hi guys,
    Hope you can help me asap.
    I have installed OSX Mountain Lion few minutes ago, but I have a lot of problems...
    1.) I cannot access Gmail in Opera (opera web browser) - I have the latest version, also trying reinstall it. It just says:
    Secure connection: fatal error (49)
    https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&cont inue=http://mail.google.com/mail/&scc=1<mpl=default<mplcache=2
    The certificate is valid, but permission denied.
    I know, Opera isn't the best web browser, but because of my work, I need to use atleast 2 web browsers together... so I use Opera and Safari.
    Never before had this problem with Opera.
    2.) I cannot acces some sites on Safari... For example adobe.com (and it works in Opera...)
    For example I cannot access adobe site:
    Safari can't connect to this server
    Safari can't open the page "http://www.adobe.com/ because Safari can't connect to the server "www.adobe.com".
    Please help me.
    Thanks,
    Filip

    From the Safari menu bar, select
    Safari ▹ Preferences ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.
    If you wish, you may be able to salvage the malfunctioning extension by uninstalling and reinstalling it. That will revert its settings to the defaults.

  • Problem with XK99 Mass Load Maintenance

    Hi all,
    While trying to use XK99 for Mass Load Maintenance, to mark suppliers for deletion at Co Code level (LFB1-LOEVM), we're getting the error 'Changes could not be saved' and we couldn't find the reason why.
    Can you give us a hand on this to figure out why this is happening?
    Thanks.

    I checked the log in t-code SLG1 but couldn't find too much more information in there..
    Changes could not be saved
    Message no. M&106
    Diagnosis
    Due to inconsistencies, your changes could not be saved in the database.
    Procedure
    To find out why the error occurred, try changing a single data record using the normal change transaction and not in this transaction.
    With txn XK06 the user didn't have problems.
    Also, while checking again the information provided by user I realized that she's also trying to update field LFA1-LOEVM.
    I checked there in that table... and that field was not visible, does this mean it's not Mandatory?
    We made a little debug and found out that to update this field the txn checks for other fields and documents...

  • [solved] Problem with ssd disk, deleted files don't free space?

    Hello.
    I bought some time ago an ssd disk on which i installed arch. After some free time I changed my laptop optical drive with standard hdd and moved /home and folder with data (mainly music collection) to standard drive. To my surprise my ssd was filled as it were before. My fstab from beginning have had TRIM option enabled:
    LABEL=root / ext4 rw,noatime,discard,commit=600,barrier=0 0 1
    tmpfs /var/log tmpfs defaults,size=5% 0 0
    tmpfs /var/spool tmpfs defaults,size=5% 0 0
    LABEL=karta /run/media/kaira/karta/ ext4 rw,noatime,barrier=0,commit=600,data=writeback 0 1
    LABEL=home /home ext4 rw,noatime,barrier=0,commit=600,data=writeback 0 1
    LABEL=dane /dane/ ext4 rw,noatime,barrier=0,commit=600,data=writeback 0 1
    where the last three lines were added after second disk was installed.
    And now the great mystery for me:
    du -h / |sort -h -r|head -n 5:
    3,7G /
    2,7G /usr
    1,6G /usr/lib
    845M /usr/share
    771M /var
    df:
    System plików rozm. użyte dost. %uż. zamont. na
    /dev/sdb1 118G 27G 90G 24% /
    devtmpfs 3,8G 0 3,8G 0% /dev
    tmpfs 3,8G 1,4M 3,8G 1% /dev/shm
    tmpfs 3,8G 4,0M 3,8G 1% /run
    tmpfs 3,8G 0 3,8G 0% /sys/fs/cgroup
    tmpfs 3,8G 13M 3,8G 1% /tmp
    tmpfs 389M 32K 389M 1% /var/log
    tmpfs 389M 0 389M 0% /var/spool
    /dev/sda1 50G 241M 49G 1% /home
    /dev/sdc1 30G 45M 29G 1% /run/media/kaira/karta
    27G was the state before most data was transfered to different hard drive.
    Both commands where executed after partition with music was unmounted.
    I executed also fstrim / command, but it changed nothing.
    Is this behavior normal, or maybe i didn't made something important/ my disk is damaged?
    I know that 24% fulfillment is trivial, but now it definitely should show 3,5%.
    Last edited by kaira (2013-11-01 19:45:31)

    Yes, I run this command as a root. I manage to repair this problem by mounting root partition in ubuntu live cd. I found folder which should get deleted, but it still was in filesystem. Unfortunetly I don't remeber, how i copy files. Propably i used rsync and forget to delete files. Now it's too late too check this theory, but I'm really happy with proper sizes:
    Filesystem Size Used Avail Use% Mounted on
    /dev/sdb1 118G 3.6G 113G 4% /
    devtmpfs 3.8G 0 3.8G 0% /dev
    tmpfs 3.8G 6.0M 3.8G 1% /dev/shm
    tmpfs 3.8G 3.9M 3.8G 1% /run
    tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
    tmpfs 3.8G 356K 3.8G 1% /tmp
    tmpfs 389M 0 389M 0% /var/spool
    tmpfs 389M 32K 389M 1% /var/log
    /dev/sda2 410G 25G 381G 7% /dane
    Lesson learned - never manage important system changes after getting up, without enough sleep time.
    Thank you for you're help, and sorry for wasting time with my mistakes.

  • Still got problems with java class business operations

    Hi all,
    I've read the latest on business operations and java class files, but my problem
    remains - the workaround of putting the class file in the studio classpath did
    not work for me.
    To breifly recap the problem -
    I am unable to assign an instance variable when trying to call a predefined business
    operation of a java class. Calling the constructor seems to work okay and I can
    assign the result to a variable of type "java object" but that's as far as it
    goes. If I try placing the class file in the studio classpath, my "Instance Variable"
    dropdown list dims, but I am still prompted to choose one when I press okay.
    I'm using process integrator 2 sp2 on wls6.
    Please help!
    Regards
    Andrew

    Still no good. I'm running my testing on my own PC with windows 2000. Maybe a
    windows bug rather than a remote bug?!
    Anyone else have a suggestion?
    "Soteri Panagou" <[email protected]> wrote:
    >
    Andrew
    What platform are you running on?
    I have found the same problem when trying to run wlpi remotely.
    We have a sun box with the WLI installation. When i run wlpi on that
    box, and
    do the business operation configuration as u describe below, i get instance
    variables
    populated in the drop down box of the business operation window. I can
    then select
    the java object my instance is assigned to.
    However, when i connect remotely using the studio and try to view the
    business
    operation settings, nothing appears in the instance drop down box.
    When i go back to the console and run the studio on the same machine
    as the installation,
    the instance variable drop down is populated once again.
    So all i can say is, configure the workflow on the machine have the running
    installation,
    and then it should work. It did for me :)
    Hope this helps
    Steri
    "Andrew" <[email protected]> wrote:
    Hi all,
    I've read the latest on business operations and java class files, but
    my problem
    remains - the workaround of putting the class file in the studio classpath
    did
    not work for me.
    To breifly recap the problem -
    I am unable to assign an instance variable when trying to call a predefined
    business
    operation of a java class. Calling the constructor seems to work okay
    and I can
    assign the result to a variable of type "java object" but that's asfar
    as it
    goes. If I try placing the class file in the studio classpath, my "Instance
    Variable"
    dropdown list dims, but I am still prompted to choose one when I press
    okay.
    I'm using process integrator 2 sp2 on wls6.
    Please help!
    Regards
    Andrew

  • Problem with adding "Perform Business Operation" action

     

    Thanks Vamshi.
    Regards,
    Alexander.
    "Vamshi K Mugatha" <[email protected]> wrote in message
    news:[email protected]..
    Hi Alexander,
    This is a known problem and the workaround for this is to add the classesin the
    classpath of the studio.
    Vamshi
    Lebedev Alexander wrote:
    Hi,
    every time I add "Perform business operation" that invokes Java Class
    method
    (not static), the "Instance Variable" combobox is empty, although Idefine
    three Workflow Variables with Java Class type. When I try to save this
    action I receive the following error "You must select an InstanceVariable
    for this Business Operation".
    thanks,
    Alexander.
    Name: studio_screen.bmp
    studio_screen.bmp Type: Bitmap Image (image/bmp)
    Encoding: x-uuencode

  • Problems with pre-mapping process operator in owb 9i

    Hi,
    I was trying to use the pre-mapping process operator in owb 9i. Problem is that the manual does not specify how the inputs need to be connected to this operator.
    Following is what I went through -
    I created a mapping table operator and a mapping dimension operator and connected these two. Then i created a pre-mapping process operator selecting the LTRIM function. Further I connected one of the table attributes to this pre-mapping operator as input and connected the output of this pre-mapping operator to the appropriate dimension operator attribute.
    On performing Validate, following error message was flashed -
    VLD-2451 : Illegal connection to pre-mapping process operator
    I am trying to learn how to use OWB 9i from the manual. So my interpretation of the use of the pre-mapping process operator may be wrong.
    In any case kindly help,
    Thanks,
    Saju

    Pre-mapping process is use to perform some operations preceding to mapping operation itself.
    For example, if your mapping is designed to incrementally append data to table for the definite time interval (witch is a parameter of the map operation) you might want to perform the table data cleanup for that period. That will allow for reload data number of time.
    In this case you have to define the procedure witch perform cleanup and than include the call to that procedure as a pre-mapping process.
    Other examples of pre- and post mapping process is disabling referential integrity before loading and re-enabling them after loading.
    Anyway, OWB documentation has clear definition for pre- and post-mapping processes.

  • Does anybody has problem with playing youtube in Opera Mini after iOS6 update?

    After iOS6 update I can not play youtube from Opera Mini,- neither link to youtube works and embedded video as well. It works ok with Safari, but I prefer using Opera Mini instead. If there is a embedded youtube video or just a link to m.youtube, Opera mini does nothing:(

    Cool, in OperaMini forum, there is an answer, that issue has been noticed and will be solved someday!
    http://my.opera.com/community/forums/topic.dml?id=1316462&page=2#comment13138752

  • Problem with partition after deleting a bootcamp partition

    Hi everyone !
    First, excuse my english, I'm from France.
    This morning, I've deleted the bootcamp partition I had created weeks ago. But when I've tried to extend the principal partition on the empty space left by bootcamp, the Disk Utilitaire says : "Partition failed : impossible to modify the partition map because the verification of the files system failed."
    I tried to extend the partition with the hided partition that we use when we can't boot on the main partition (I don't know how to say its name in english).
    If someone have a solution, it would be cool !

    Back everything up (preferably twice, 3 times for the really paranoid).  I would use Carbon Copy Cloner and/or SuperDuper to make bootable clones to external disks.
    Test the clone(s) by booting from them.
    Repartition the boot disk the way you want it.
    Restore your cloned system from the external disk.

Maybe you are looking for

  • Print of PO Before release

    Dear All, Please help me in one scenario. My client want PO print before release. He want to take print of po before release so that he can bargain with vendor & make changes accordinglly before release. Actually he doesn't want to release the po aga

  • Cannot resolve symbol: class EJBObject

    Using javac I get this compile error on this file Calculator.java Calculator.java:1: cannot resolve symbol symbol : class EJBObject location: package ejb import javax.ejb.EJBObject; ^ Calculator.java:5: cannot resolve symbol symbol : class EJBObject

  • Configuration File goes bad in Cisco AnyConnect Secure Mobility Client.

    Hi everyone We are running a Cisco ISE Version: 1.3.0.876 Patch 1 for 802.1X deployment (Wired + Wireless) with posture assessment where the supplicant for the endpoint is Cisco Anyconnect Secure Mobility Client v4.0.00061. Symptoms: The Configuratio

  • Firewire 800 Readers non-existent except on ebay for $169?

    Did someone stockpile them to sell them to mac users who don't have an express card slot in there mac seems crazy. Any comparisons on speed difference when reading from firewire 400/800 on high speed cards

  • Can I put 2 or 3 via monitors on new Macbook air/Mavericks?

    I'd like to put two or three vga monitors on a Mac Mini or MacBook air. How do you do that? Any problems likel?