DELETE the query takes a long time

Hi all guru.

My Version of DB: 10.2.0
OS: Windows Server 2003

I run a delete on a table of paritioned command to remove all the lines in one of the parition. The command is:

The table name is cat_in_data_052012

delete CAT_IN_DATA_052012 WHERE name of FILE AS: SYS_B_O


Table conatins million record.


Thanks in advance

>
I run a delete on a table of paritioned command to remove all the lines in one of the parition. The command is:

The table name is cat_in_data_052012

delete CAT_IN_DATA_052012 WHERE name of FILE AS: SYS_B_O
>
Mention the name of partition specifically in the query to ensure that only one partition is affected.

See the example (at the end) for the deletion of rows in a Partition in the SQL reference Guide
http://docs.Oracle.com/CD/B12037_01/server.101/b10759/statements_8005.htm#i2126857

Deleting Rows from a Partition: Example

The following example removes rows from partition sales_q1_1998 of the sh.sales table:

DELETE FROM sales PARTITION (sales_q1_1998)
   WHERE amount_sold > 10000;

Tags: Database

Similar Questions

  • Select the query takes a long time to run the second time

    Hi all

    I have Oracle 11 GR 1 material in windows server 2008 R2.
    I have a few tables with 10 million documents. When I run the select query to the tables of first time, it gives me a result in 15 seconds, but if I run the script even twice in the same session, I get the result in 15 minutes to complete...

    Why it's happening? What can be the solution for this?

    Thank you and best regards,
    Vikash jain (DBA Junior)

    What I know is that this feedback from cardinality generates more problems than improving the performance is, in fact, its main objective. But first look at which is was written in the link I posted above

    "Return of cardinality was introduced in the Oracle 11 g database 2. The purpose of this function is to automatically improve plans for queries that are executed repeatedly, _For that the optimizer does not estimate the cardinalities in the properly_ plan"

    If the cardinality feedback kiks in your case it is certainly because you do not have an exact statistics. Get the command the explain plans that I have shown you with the E-lines and A-lines (lines estimates and actual lines) and see where things are poorly estimated.

    If you want to disable the cardinality feedback then add the indicator according to your request

    /*+ opt_param('_optimizer_use_feedback','false') */
    

    Best regards

    Mohamed Houri
    www.hourim.WordPress.com

    Published by: Mohamed Houri on November 22, 2012 02:11
    Published by: I was looking for the exact indication of how do I deactivate the cardinality feedback and I foud in an ot the Dominic post in otn :-)

    Published by: Mohamed Houri on November 22, 2012 02:15

  • Query takes a long time

    Hi Experts

    I'm using Oracle 11 g, I use under delete query to remove records of staging table.

    under query takes a long time (ranging from 1 hour, even there is no record to delete.

    I created payment_id indexes also did not help.

    delete from siebelwb.stg_p where payment_id not in (select * from siebel.s_src_payment)

    I know NOT of IN is degreding performace, is there another way to write above request so that we can remove them in NOT IN use.

    Try to use NOT EXISTS clause...

    Also you inner query must match the payment_id with query parent then here's the example query...

    removal of siebelwb.stg_p where THERE is NO payment_id (select 1 from siebel.s_src_payment where s_src_payment.payment_id = stg_p.payment_id)

  • Starting the server takes a long time due to the storage of JMS persistence files

    Hello

    We use WebLogic 9.2 on a windows machine.
    Recently, we have improved our request to work with JMS.
    We are on 2 different servers in a cluster using 2 JMS servers and works with distributed destinations.
    We use file storage as our persistence store.

    Recently, we found boot server takes a long time because of the actions that are performed on the storage of files.
    Analysis of this problem, we have seen that the size of the file is of ~ 2 GB.
    We understand that the file size does not fear (unless it is compacted manually), and its size matches the largest number ever of pending messages in the queues (as a mark of high tide).
    We shot also store debugging, using weblogic. Debug.DebugStoreIOPhysical and we saw a lot of recovery after newspapers file storage is open.
    We have checked and checked our JMS transactions are completed successfully. We also checked that the current messages and number of courses is 0.
    We stopped the server gracefully, check that there are no messages pending.
    However, several times takes start server ~ 30 minutes due to heavy work on the persistence store.
    Compaction or remove storage of files eliminates the delay.
    However, we want to avoid the manual operations whenever we want to start the server.

    Please share your ideas.

    Thank you
    Itsik

    The only suggestions I have off the top of my head are:

    * Ensure (1) the host system has at least 2 GB (the store file size) memory physics in addition to the memory used by the current process, and (2) the host system is not rebooted between each restart WebLogic. If you ensure that both of these, then the operating system puts implicitly cached content of the file of the store in memory even between boots - when WebLogic starts subsequently storing files, the o/s should be the content of the file much more quickly.

    * You can move to a JDBC store. Runtime JDBC store performance are lower, but since you have generally has only a small amount of records to retrieve, startup performance should be higher in this case.

    * Not that it helps your case, but it happens that we have significant performance improvements of starting process for a future version (if all goes well a near future release).

    Tom

  • The update takes a long time

    Hi we have a customer_status of the table where we have the following columns such as contacted_date and status

    Under certain conditions, it will read all lines and update the data

    as the customer_status UPDATE

    SET contacted_date = < some_date >

    When status = 0 and contacted_date is set to null

    It's taking a long time and have hanged...

    Please let me know what I need to check in what concerns the DB from Redolog setting or any other setting that I am basically a developer all

    The current version of the DB is:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    CUSTOMER_STATUS

    CONTACTED_DATE TIMESTAMP

    STATUS NVARCHAR (1)

    Any suggestions would be much appreciated.

    I've seen this kind of problem before and there is no simple answer.  You are better off watching a redesign, otherwise, you will have to resort to brute force tactics to improve performance.  And even then the best you can do is still very limited.

    If you have a table "customer_status" with a "status" column that has probably only 2-0 and 1 values.  This means that the optimizer will believe, in the absence of all histograms for each value to roughly half of the rows in the corresponding table.  Think about it, it makes sense.  In turn, that means that the optimizer is more likely to choose a full table scan to run the UPDATE.  In turn, which means that as time passes and the table grows then the update becomes slower and slower every time that it is executed.

    Solution?  A redesign.  Really, it's the "best solution".  Otherwise you still go to the fight against the problem that the "Status" column has only 2 values in it and Oracle can assume that half of the lines end with each value.  With these statistics, the optimizer will always choose a full as table scan being the cost lowest and as the table grows so the update is slower.

    You can try to create an index on the status and contacted_date on customer_status (status, contacted_date).  But that works only if the "status" has a NOT NULL constraint on it, which does not appear in your column definitions.  Without that the index would be always useless and Oracle would still do a full table scan.

    You would also go the questions that your query uses a 0, which is a NUMBER, but the definition of the column is of type NVARCHAR and Oracle will add an implicit conversion around the column to convert number in the execution of the query, which again once stops using the index on two columns.  Data types must match for an index to use.

    You could create a histogram of frequencies located on the 'Status' column so that the optimizer has more precise statistics.  But this can depend on when in the day, the table statistics are collected.

    These tables tend to be very dynamic with data changing in their breast. How many lines in this table?  Are all deleted?  Or they stay there forever?  How many times does change the status value?  Or it fixed once and stay the same forever?

    I've seen problems of treatment of systems with a table of 'work' with a "status" column on work, and depending on what time of the day, statistics were collected from this table, it could have vastly different numbers of lines in there and a different number of lines with different values for the 'status '.  Ultimately we did an overhaul and separate tables used - one for in the expectation of work - and one for completed tasks that kept the data sets smaller and meant that the table 'pending' only pending works in.

    John

  • Save the JPEG, the process takes too long time, how to cut it short?

    Hi all

    I work 8 hours a day using Photoshop CS6 each time come to SAVE JPEG, it ask the quality and I have to select "highest quality 12", I go to the settings to reset, so that my files JPEG is always 12?

    Thank you

    Hi JimmyChelsea,

    Yes, reset default return Photoshop preferences and then open a jpeg file save the image with a high quality 12 and next time when you save any other jpeg, it should show you the quality, worth 12.

    To re-create the Photoshop preferences files, start the application while pressing Ctrl + Alt + Shift (Windows) or command + Option + shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop settings file?"

    Kind regards

    Mohit

  • Delete the user takes so long.

    Hi guys,.

    I have a schema that contains about 1600 objects. Size of dump of export for which is around 8 or 9 MB.
    When I try to drop this user, it must be at least 5 minutes.

    The details are:

    Windows 2008
    Oracle 11 g 2


    Can anyone help?

    Salvation;

    Please check below note and link:
    Drop User Cascade very slow in 10.2.0.4 [ID 798586.1]

    See also:
    User to fall to take too much time
    User to fall to take too much time
    http://www.dbasupport.com/forums/archive/index.php/t-36615.html

    Respect of
    HELIOS

  • How to stop the query takes too long

    Is there a way to tell oracle to stop a query that takes too long to run?

    I'm trying to end a way to prevent some users from running any querys that takes more than 2 minutes... any help?

    I use 10g

    Thank you!

    Hello

    You can create a profile... and limit...

    CREATE a PROFILE prof_low LIMIT
    CPU_PER_CALL 3000 (about 30 seconds)
    PRIVATE_SGA 500K
    LOGICAL_READS_PER_CALL 1000;

    ALTER USER myuser PROFILE prof_low;

    Concerning
    Joao Oliveira

  • After paper jam, rolls making noises and the printer takes a long time to spit the copy.

    It is an all in one Officejet Pro 8600 and is still under warranty. How can I get fixed roller?

    Wow!  I found the video on how to find a paper jam!    It was a step that was not included on the instructions of the machines, i.e. check behind the print cartridge and the whereabouts of my paper jam!   When everything has failed, read the instructions, eh?

    Thank you!  My problem is solved!

  • XY graph sometimes takes a long time to update legend

    Hello

    I wrote a small piece of code that highlights (changes line width) the plot on the graph when we click a mouse on its name in the legend of the plot. The code works well except when I the legend scroll bar is visible and its position is not 0, then when I click on the name of the parcel, the chart takes a long time(>4s) to change the width of the plot on the legend. The plot on the graph is updated instantly. Its only the legend of the plot that takes a long time to get updated.

    I enclose the code here... Please, run it and see if you also see the same behavior.

    Thank you

    Ritesh

    Hi Ritesh,

    The patch of f2 is already released. http://www.NI.com/download/LabVIEW-development-system-2015/5656/en/

    We will inform you of the R & D of your first question, but unfoturnately we cannot provide information on future products releases.

    Kind regards

  • SQL query takes too long to run (1 h 25 min)... pls help how to set up the query.

    Hello

    Could someone please help how to tune the query as its takes a long time to retrieve the results.

    Select

    col1,

    col2,

    col3,

    COL4,

    col5,

    col6,

    col7,

    COL8,

    col9,

    col10,

    Col11,

    col12,

    Sum (volume1),

    Sum (volume2),

    Sum (volume3),

    Sum (volume4),

    Sum (volume5),

    Sum (volume6),

    Sum (volume7),

    Sum (volume8),

    Sum (volume9),

    Sum (volume10),

    Sum (volume11),

    Sum (volume12),

    Sum (volume13),

    Sum (volume14),

    Sum (volume15),

    Sum (volume16),

    Sum (volume17),

    Sum (Volume18),

    Sum (volume19),

    Sum (volume20),

    Sum (rate1),

    Sum (rate2),

    Sum (rate3),

    Sum (rate4),

    Sum (rate5),

    Sum (rate6),

    Sum (rate7),

    Sum (rate8),

    Sum (rate9),

    Sum (rate10),

    Sum (rate11),

    Sum (rate12),

    Sum (rate13),

    Sum (rate14),

    Sum (rate15),

    Sum (rate16),

    Sum (rate17),

    Sum (rate18)

    Sum (rate19),

    Sum (rate20)

    Of

    Table 1 - 13, 25, 99, 400 records

    Table2 - 13, 45, 1000 records

    Table 3 - 4, 50, 000 records

    Table 4 - 1,00,000 records

    table5 - 30 000 records

    where tabl1.col1 = table2.col2,

    Table1.Col1 = table3.col1.

    table2.col2 = table3.col2...

    Group

    Sum (volume1),

    Sum (volume2),

    Sum (volume3),

    Sum (volume4),

    Sum (volume5),

    Sum (volume6),

    Sum (volume7),

    Sum (volume8),

    Sum (volume9),

    Sum (volume10),

    Sum (volume11),

    Sum (volume12),

    Sum (volume13),

    Sum (volume14),

    Sum (volume15),

    Sum (volume16),

    Sum (volume17),

    Sum (Volume18),

    Sum (volume19),

    Sum (volume20),

    Sum (rate1),

    Sum (rate2),

    Sum (rate3),

    Sum (rate4),

    Sum (rate5),

    Sum (rate6),

    Sum (rate7),

    Sum (rate8),

    Sum (rate9),

    Sum (rate10),

    Sum (rate11),

    Sum (rate12),

    Sum (rate13),

    Sum (rate14),

    Sum (rate15),

    Sum (rate16),

    Sum (rate17),

    Sum (rate18)

    Sum (rate19),

    Sum (rate20)

    Thank you

    Prasad.

    > Could someone please help how to tune the query as its takes a long time to retrieve the results.

    The query you posted is obviously fake.

    If you ask to give us a request that you do not post and we cannot see.

    For real?

  • After that effects 2015.3 takes a long time to open, left after the closing process running

    My AE 2015.3 takes very long time to start. He gets the message "Initializing MediaCore" on the splash screen and then hangs there for 1-3 minutes. It opens also a ton of "Adobe After Effects 2015.3" tasks in the Task Manager, leaving them running even after I quit the program.

    Here is what my task manager looks at this time (no AE running)

    AECrazy.jpg

    So far, what I've done:

    1 uninstalled all Adobe software, including Adobe CC Panel

    2 uninstalled all 3rd party plugins, scripts, and presets

    3. manually deleted all files from adobe - complete cleaning

    4. re-installed AE and some other programs

    (all with reboot between the two).

    No difference.

    Help?

    Apparently, nVidia GeForce drivers are at fault. The break of v368.81 WHQL way Adobe applications communicate with Media Core, make After Effects, first and slow speed Grade, leaving the additional processes in their wake and spoil some plugins 3rd party.

    Returning to a previous driver nVidia solved all the problems.

  • The system preference takes a long time to load

    As the title suggests, end of 2013 (10.11.4) System Preferences on my iMac takes a long time to load, even after a fresh reinstall and/or reboot (tried both). It takes about 20 seconds to one minute each time to open (except when I close it and immediately open it once again, as it is always loaded in memory). This problem existed only after the upgrade to El Capitan, and I saw many other people with iMacs with the same problem. I tried to remove cache for before system preferences files, but that did not help at all. I don't have a FileVault if it makes a difference, even if I did before reinstall, but never turned back (persistent question anyway). Any recommendations would be useful. Thank you!

    Data sheet:

    iMac (end 2013)

    Intel Core i5 at 2.7 GHz

    8 GB 1600 MHz DDR3

    1 TB 5400 RPM HARD DRIVE

    Intel Pro Iris 1536 MB

    I found it is the State of affairs in 10.11 if running a HD spinning.  Don't feel alone.

    I suspect that it is a function of low priority in the memory compressed algorithm.

    Upgrading to an SSD and it will rise to attention.

  • Visual Studio 2008 Pro takes a long time to start after the installation of measurement Studio 2009

    After installing Measurement Studio 2009, I noticed that it takes a long time (30-60 seconds) to open a Visual Studio project.

    I do not have an internet connection on my development computer and suspect he might be waiting on some kind of operation of the network to time out.  I had problems with Visual Studio in the past as well and had to work around them by adding entries to my hosts file (to redirect some addresses of Microsoft to the local IP address - this causes network operations to expire immediately).

    Just curious if anyone has encountered this kind of slow startup time and found a solution.

    Thank you!

    I found an article referring to a question similar to MS 8.1.  I don't know if the problem has simply not been corrected or why I am still having this problem.  Workaround "per computer" listed in the article solved my problem.

    http://digital.NI.com/public.nsf/allkb/18E25101F0839C6286256F960061B282 I have

  • Reading text file takes a long time after the first time

    Dear experts LabVIEW,

    I'm having a problem with playback of text file. I'm reading only each Nth line from a file to preview with this sub vi:

    I seems to work the first time I do it well. The loop takes almost no time to perform an iteration.

    Then when I load the same file with exactly the same parameters an iteration takes about 50ms.

    Subsequent attempts always seem to take longer execution time.

    Only when I restart the calling vi fast for a single file.

    When executing the sub vi alone it is still fast, but I don't see how the main vi (too complex to post here) could hinder the execution of the Sub vi.

    I have no one else to open the file in the main vi, I do not use too much memory...

    Just now I have not now where to look. Does anyone have an idea?

    Concerning

    Florian


Maybe you are looking for

  • How can I access the 'Options' of Firefox window?

    I'm trying to change the setting for Firefox, so I can access Flash, constantly, but I can't locate the 'Options' window that I read in the articles, that I need to make changes to what I can access Flash. Can you tell me how to access? Or if not, ho

  • Satellite P200 - 1 d 0 (PSPB6E) - CD/DVD drive will not read a disc

    Hi all Given that I have uninstall powerDVD on my laptop and alcohol 52% of my laptop, I'm unable to read any disc DVD or HD-DVD When I insert a disc, the departure by car to analyze and scan again and a new analysis... some applications like IE are

  • HP Photosmart D7360

    I'm working on a Photosmart D7360 printer.  'Training' rollers do not turn for the supply of paper for printing.  When you try to print a test page, no paper is 'loaded '.  Finally, the error returns "on paper", even though a large paper is in the tr

  • Problem with the shortcut menu custom BB10

    Hi all I am currently trying to implement a context menu that is customized with my webworks app. So far I'm not creating a normal webworks / bbUI app, but I'm trying to add some features of bbUI. So to speak, I have a few different elements in my ap

  • Medieval II: Total War Kingdoms errors and closes when I run the extended version

    Hi, I'm an Italian Player. I have the Italian version of medieval 2 total war and the italianversion of the expansion of the Kingdom. When I play with medieval 2 total war not expanded, it is all ok. When I play a Pentecost of the four campaign speci