Request to take so long to run.

I have a table with 211 lines, when I execute Delete TEHSIL_TBL; its taken too long to remove 211 lines. I run explain plan then I get the following results.



SQL > explain the plan of removal of TEHSIL_TBL;

He explained.

SQL > @C:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlxpls.sql

PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------------------
Hash value of plan: 3350021484

-------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
-------------------------------------------------------------------------------
| 0 | DELETE STATEMENT. 205. 1435. 1 (0) | 00:00:01 |
| 1. REMOVE | TEHSIL_TBL |
| 2. INDEX SCAN FULL | PK_TEH_ID | 205. 1435. 1 (0) | 00:00:01 |
-------------------------------------------------------------------------------


Please suggest why that question take if long tome to run.


Thanks in advance...
Sandra

966523 wrote:
Lines are deleted and not the database is ready to hang.

Probably because some other session is keeps a lock on the lines and you prevent delete. Maybe a long running query/query group that only not Commit / Rollback, or a developer who has run a DML against data but no COMMIT / Rollback.

"Check the output of '.
{code}
SELECT
s.blocking_session,
s.SID,
s.Serial #.
s.seconds_in_wait
Of
v$ session s
WHERE
blocking_session IS NOT NULL;

-Blocking session with more information:
SELECT s1.username. '@' || S1.machine
|| ' (SID =' | s1.sid | block him ') '
|| S2. UserName | '@' || S2.machine | ' (SID =' | s2.sid |) ') ' AS blocking_status
V $ lock l1, v$ session s1, v$ lock l2, s2 of v$ session
WHERE s1.sid = l1.sid AND s2.sid = l2.sid
AND l1. BLOCK = 1 AND l2.request > 0
AND l1.id1 = l2.id1
AND l2.id2 = l2.id2;

-Blocked objects
SELECT sid, u.object_id
The LOCK of v$, user_objects u
WHERE TYPE = "TM".
and you.object_id = id1;
{code}

Use the query above to find if someone blocks your deletions. This should be performed when you run Delete statements and when they appear stuck.

Tags: Database

Similar Questions

  • Statement Update takes too long to run

    Hi all

    I am trying to run this update statement. But its takes too long to run.
        UPDATE ops_forecast_extract b SET position_id = (SELECT a.row_id
            FROM s_postn a
            WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME)))
            WHERE position_level = 7
            AND b.am_id IS NULL;
            SELECT COUNT(*) FROM S_POSTN; 
            214665
            SELECT COUNT(*) FROM ops_forecast_extract;
            49366
    SELECT count(*)
            FROM s_postn a, ops_forecast_extract b
            WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME));
     575
    What could be the reason for the update statement to run so long?
    Thank you

    polasa wrote:
    Hi all

    I am trying to run this update statement. But its takes too long to run.

    What could be the reason for the update statement to run so long?

    You did not say what means "too long", but a simple and good reason might be that the scalar subquery on "s_postn" using a full table for each run scan. Potentially this subquery is executed for each row of the table "ops_forecast_extract" that satisfies your filter predicates. 'Potentially' due to "filter/subquery optimization" cunning of the Oracle execution engine that tries to cache results of already executed of instances of subquery. Given that the in-memory hash table that contains these cached results is limited in size, the optimization algorithm depends on the sort order of data and could suffer collisions of hash that it is unpredictable, how this optimization works in your particular case.

    You can view the execution plan, it should at least tell you how Oracle will run the scalar subquery (that tell you nothing about this "filter/subquery optimization" feature).

    Follow the generic guidelines how to generate a useful plan explain output and how to post here:

    Could please post a correctly formatted explain you plan output using DBMS_XPLAN. SCREEN, including the 'Predicate information' section below the plan to provide more details about your statement. Please use the noformat} [{noformat} code {noformat}] {noformat} before tag and {noformat} [{noformat} / code {noformat}] {noformat} tag or after the noformat} {{noformat} code {noformat}} {noformat} tag before and after to improve the readability of the outing:

    In SQL * more:

    SET LINESIZE 130
    
    EXPLAIN PLAN FOR ;
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    

    Note that the DBMS_XPLAN package. DISPLAY is only available from 9i on.

    In 9i and above, if "Predicate information" section is missing from the DBMS_XPLAN. Output display, but you get the message "Plan table is old version" instead, you must recreate your plan table using the script server '$ORACLE_HOME/rdbms/admin/utlxplan.sql '.

    In previous versions, you can run the following in SQL * Plus (on the server) instead:

    @?/rdbms/admin/utlxpls
    

    A different approach in SQL * more:

    SET AUTOTRACE ON EXPLAIN
    
    ;
    

    also displays the execution plan.

    In order to get a better understanding where your statement passes the time, you might want to turn on SQL tracing as described here:

    When your query takes too long...

    and after the "tkprof' out here, too.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • 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?

  • Query takes too long to run after clone

    Hi all

    We have a query that works well in our development environment and take about 15 seconds to run the query. When we run the same query with the same parameters in a recently cloned instance, the query takes 1200 dry run.
    Please help us on this issue.

    Thank you
    Rambaud

    Thanks for any response.
    We have solved the problem by using indicators of index.

    Thanks for the update!

  • Executed scripts takes too long

    Hello

    I hope for more help with improvement / reducing the amount of time required to get a script to run. I have provided the following script to our CMDB group but they say it take too long to run (full day).

    I already use the get-view option to extract the details. Maybe someone can advise how they would improve this script. For the record, we have 2000 + vm in our environment.

    Script is attached.

    Any help is very appreciated.

    Hello, VM_.

    Well, nobody likes a slow script, that's for sure.  And a script of the day?  Double boo to that.

    I had a quick glance, and there were some spots of improvement.  I have them made here:

    Add-PSSnapin VMware.VimAutomation.Core
    
    function Get-VMSerial {  ## rewrote to take UUID; already being gotten in properties below  # param([VMware.VimAutomation.ViCore.Impl.V1.Inventory.VirtualMachineImpl]$VirtualMachine)  # $s = ($VirtualMachine.ExtensionData.Config.Uuid).Replace("-", "")  param([string]$Uuid)  $s = $Uuid.Replace("-", "")  $Uuid = "VMware-"  for ($i = 0; $i -lt $s.Length; $i += 2)  {    $Uuid += ("{0:x2}" -f [byte]("0x" + $s.Substring($i, 2)))    if ($Uuid.Length -eq 30) { $Uuid += "-" } else { $Uuid += " " }  }
    
      return $Uuid.TrimEnd()}
    
    # Connect to vcenterConnect-VIServer vcenter
    
    #Gathering VM settingsWrite-Verbose -Verbose "Gathering VM statistics"$VMReport = @()$Count = 0
    
    ## no need to use Get-VM#Get-VM | % {## moved outside of the Foreach-Object scriptblock, so this Get-View only gets called once, not 2000+ times (not once per VM, just once at all)$filter = @{"Config.Template"="false"}Get-View -ViewType VirtualMachine -Filter $filter -Property Name,Guest.HostName,summary.config.numcpu,summary.config.memorysizemb,summary.config.numEthernetCards,Summary.Config.NumVirtualDisks,Config.Uuid,Parent,Guest.GuestFamily,config.tools.toolsversion,guest.toolsstatus,config.Version,Config.ChangeTrackingEnabled,Datastore,AvailableField,Value | %{    ## $vm is the View of the current VM    $vm = $_    ## not used -- removed it    # $CustomDetails = Get-VM $_ | Select -ExpandProperty customfields    ## rewrote to use Get-View or UpdateViewData()    # $LunTierStringArray = Get-VM $_ | Get-Datastore    $LunTierStringArray = Get-View -Property Name -Id $vm.Datastore    $LunTierString = $LunTierStringArray.Name -split "_"    $vms = "" | Select-Object VMName, Cluster, DnsName, TotalCPU, TotalMemory, TotalNics, Disks, DiskTier, SDF, UUID, Folder, OS, ToolsVersion, ToolsStatus, HardwareVersion, CBT, Serial    $vms.VMName = $vm.Name    ## rewrote to use UpdateViewData()    # $vms.Cluster = $(Get-vm $_ | Get-cluster).Name    $vms.Cluster = &{$vm.UpdateViewData("Runtime.Host.Parent.Name"); $vm.Runtime.LinkedView.Host.LinkedView.Parent.Name}    $vms.DnsName = $vm.Guest.HostName    $vms.TotalCPU = $vm.summary.config.numcpu    $vms.TotalMemory = $vm.summary.config.memorysizemb    $vms.TotalNics = $vm.summary.config.numEthernetCards    $vms.Disks = $vm.Summary.Config.NumVirtualDisks    $vms.DiskTier = $LunTierString[0]    ## getting this in some other way, from the    # $vms.SDF = ($_ | Get-Annotation -CustomAttribute 'School/Division/Faculty').Value    $vms.SDF = & {$intCustomAttributeKey = ($vm.AvailableField | ?{$_.Name -eq "School/Division/Faculty"}).Key; ($vm.Value | ?{$_.Key -eq $intCustomAttributeKey}).Value}    $vms.UUID = $vm.Config.Uuid    ## add -Property Name, though, with " | Out-Null", does this even work?    # $current = Get-View $vm.Parent | Out-Null    $current = Get-View $vm.Parent -Property Name,Parent -ErrorAction:SilentlyContinue    $path = $vm.Name    do {         $parent = $current         if($parent.Name -ne "vm"){$path =  $parent.Name + "\" + $path}         ## add -Property Name, though, with " | Out-Null", does this even work?         $current = if ($null -ne $current.Parent) {Get-View $current.Parent -Property Name,Parent -ErrorAction:SilentlyContinue}    } while ($current.Parent -ne $null)    $vms.Folder = $path    $vms.OS = $vm.Guest.GuestFamily    $vms.ToolsVersion = $vm.config.tools.toolsversion    $vms.ToolsStatus = $vm.guest.toolsstatus    $vms.HardwareVersion = $vm.config.Version    $vms.CBT = $vm.Config.ChangeTrackingEnabled    $vms.Serial = Get-VMSerial -Uuid $vm.Config.Uuid    $VMReport += $vms    $Count++    ## added Write-Verbose so that the pipeline does not get polluted with strings (for the day that this code is returning objects for further manipulation down the pipeline, instead of going straight to CSV)  Write-Verbose -Verbose $Count}#Output$VMReport | Export-Csv vcenter_vm_report.csv_tmp -NoTypeInformation -UseCultureCopy-Item vcenter_vm_report.csv_tmp vcenter_vm_report.csv
    

    I commented on the changes I made (and why) and commented on by the code I replaced.  Give a run and see if it is not faster for you / your CMDB crew.

    Message has been edited by Matt Boren on February 24, 2015: correction of the piece that gets the path of the inventory of the VM (were able only to return a parent level previously) minor

  • What query takes too long

    How can you know which application takes too long to run in a database? and most of the resources consumption?

    user3636719 wrote:
    How can you know which application takes too long to run in a database? and most of the resources consumption?

    Try to use the following text:

    SELECT * FROM
    (SELECT
    sql_fulltext,
    sql_id,
    child_number,
    disk_reads,
    executions,
    first_load_time,
    last_load_time
    V $ sql
    ORDER BY DESC elapsed_time)
    WHERE ROWNUM<>
    ;

    Also, try the v$ session_longops querying:

    Select * from)
    Select the target, sofar, less, totalwork.
    units, elapsed_seconds, message
    from v$ session_longops by start_time desc)
    where rownum<>

    Kind regards
    Rizwan Wangde
    SR Oracle DBA.
    http://Rizwan-DBA.blogspot.com

  • Data dictionary query takes too long.

    Hello
    I'm using ORACLE DATABASE 11 g.

    The following query takes too long to run and not give the result. As I've tried a few tricks SQL Oracle but it forces developed.
    SELECT 
    distinct B.TABLE_NAME, 'Y' 
      FROM USER_IND_PARTITIONS A, USER_INDEXES B, USER_IND_SUBPARTITIONS C
     WHERE A.INDEX_NAME = B.INDEX_NAME
       AND A.PARTITION_NAME = C.PARTITION_NAME
       AND C.STATUS = 'UNUSABLE'
        OR A.STATUS = 'UNUSABLE'
        OR B.STATUS = 'INVALID';
    Please guide me what to do? to run this query in a fast paced mode...


    Thanks in advance...

    Your query is incorrect. It returns all tables if A.STATUS = "UNUSABLE" or B.STATUS = "INVALID". Most likely, you meant:

    SELECT
    distinct B.TABLE_NAME, 'Y'
      FROM USER_IND_PARTITIONS A, USER_INDEXES B, USER_IND_SUBPARTITIONS C
     WHERE A.INDEX_NAME = B.INDEX_NAME
       AND A.PARTITION_NAME = C.PARTITION_NAME
       AND (C.STATUS = 'UNUSABLE'
        OR A.STATUS = 'UNUSABLE'
        OR B.STATUS = 'INVALID');
    

    But the above will return sous-partitionnee tables not valid/no usable index. He ain't no non-sous-partitioned tables partitioned index/index not valid/not usable with same partitions in the form of tables not partitioned with valid/no unusable indexes. If you want to get any table with indexes not valid/not usable, you outer join that's going to hurt even more performance. I suggest you use the UNION:

    SELECT  DISTINCT TABLE_NAME,
                     'Y'
      FROM  (
              SELECT INDEX_NAME,'Y' FROM USER_INDEXES WHERE STATUS = 'INVALID'
             UNION ALL
              SELECT INDEX_NAME,'Y' FROM USER_IND_PARTITIONS WHERE STATUS = 'UNUSABLE'
             UNION ALL
              SELECT INDEX_NAME,'Y' FROM USER_IND_SUBPARTITIONS WHERE STATUS = 'UNUSABLE'
            ) A,
            USER_INDEXES B
      WHERE A.INDEX_NAME = B.INDEX_NAME
    /
    

    SY.

  • 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

  • Firefox would take me to yahoo, but now he says sorry gone the requested resource is no longer available on this server and there is no forwarding address.

    When I click on my Firefox icon instead of coming yahoo I get a page that says 410 Gone. Sorry, gone the requested resource is no longer available on this server and there is no forwarding address. Remove all references to this resource. Please check the URL for proper spelling and capitalization. If you're having trouble finding a destination on yahoo try to visit the 'Yahoo homepage"or browse a list of Yahoo online services. Also, you can find what you're looking for if you try searching below (it gives a lookup field). Under the box it says please try Yahoo help center if you need further help. If I click on the homepage of Yahoo words, it will take me to the homepage of yahoo, which is used to make my my just by clicking on the icon of my Firefox. I'd appreciate any help anyone could give me. I deleted Firefox to my computer and re-uploaded with yahoo download but always the same screen when I click on the Firefox icon.

    Try resetting your homepage.

    https://support.Mozilla.org/en-us/KB/how%20To%20set%20The%20home%20page

  • My CPU runs at 100% without no reason and programs take a long time to open.

    A FEW TIMES WHEN I TRYING TO OPEN A PROGRAM FOR EXPLORER MOMENT HE TAKES A LOT OF TIME IT OPENS

    original title: RUN MY CPU to 100% BY MOMENTS AND PROGRAM TAKES a long TIME TO LOAD what COULD BE WRONG

    Hello

     
    You can try the steps in the following link and check if it solves the problem:
     
    Important: Running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.
    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.
     
    I hope this helps!
  • How can I stop my computer to go to the screen saver when I for example runs a scan of the computer, sometimes my scan takes a long time to finish?

    My problem is? How can I stop my computer to go to the screen saver when I for example runs a scan of the computer, sometimes my scan takes a long time to finish? Example I have Microsoft Security Essentials set allow to run daily on 1200 AM and until he finishes my computer goes to screen saver Mode. and when I click on my mouse, I must sign completely new in my computer > how to stop this from happening, I want to keep my Security Scan open until there finishes?

    All the solutions for this?

    Original title: Windows Vista systems

    Hello

    This can help you:

    "Enable or disable the screen saver.

    http://Windows.Microsoft.com/en-us/Windows/turn-screen-saver-on-off#1TC=Windows-Vista

    And this is how do to change the time to wait before the screensaver comes on (article 8) and how to disable the password to logon to him (art. 9):

    http://www.Vistax64.com/tutorials/85539-screen-saver.html

    "How to disable or enable Protection by password on Wake Up in Vista"

    http://www.Vistax64.com/tutorials/102686-password-protection-wakeup.html

    See you soon.

  • 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.

  • It takes a long time to send the request to print a PDF file

    Whenever I send a request for a PDF to print to a printer, it takes time for the system to respond. It takes even longer for printer receive my print request. Why?

    Read some messages in this forum, but nothing works. Adobe needs to take a look at this issue, it affects a large number of users. For this reason, Adobe Reader sucks.

    Hi mikel007,

    Open Acrobat Reader DC, go to the Help menu and repair the installation.

    Also check the updates under the Help menu. If any please install.

    If the problem persists, try the solutions listed in this KB doc.   Acrobat and Reader help / troubleshooting PDF printing | Adobe Acrobat, Adobe Reader

    Kind regards

    Nicos

  • Why ni845xDioReadLine takes several milliseconds to run?

    I use a USB-8451 to communicate with a device of RM3000 using the SPI protocol.  My program uses 'base' 8451 C API.  The RM3000 has a DRDY line which goes high when the requested data are available. This is connected to port 0, line 0 the 8451 dio interface.

    When I use ni845xDioReadLine to check the DRDY line after having written a command and before reading the response, the call of ni845xDioReadLine takes several milliseconds to execute.  The DRDY line is always already high because the ni845xDioReadLine call takes so long.

    You expect the appeal ni845xDioReadLine take as long?  The DRDY would check using the "Advanced" version of the call of ni845xDioReadLine script be faster? I'm hoping to read a 200 Hz and need to minimize the time of transaction to achieve this sampling rate.

    I am able time glancing SPI transactions on a scope and looking at the order and time of response with and without the call of ni845xDioReadLine commented.

    Any help would be appreciated.

    Thank you.

    Hi IntAndTest,

    Yes, script often improve performance because it allows the programmer to manage the measures that are being taken.  In turn, this allows to eliminate steps that the screw top level, run and manage it for you and which may not be necessary depending on the application.  "There are examples of scripts in the Finder of the example, in input and output hardware' I2C and SPI" Advanced of SPI or I2C Advanced.  It is also possible that higher speed, USB port having not made a difference, but the only real way to know would be to try a USB 2.0 port to your request.

    Hope this helps,

    Jen W

    Technical sales engineer

    National Instruments

    NI.com/support

  • Flgam takes too long to stop

    Here I would start troubleshooting in a fglam that takes too long to stop?

    Solaris 10

    Flgam version 5.6.2.4

    The full list of former agents running

    [myname@myhost bin] $ sudo. / fglam - wq

    2013-06-12 22:18:48.000 INFO [natives] send request stop at "AgentManager.

    process running in/opt/Foglight/fglam/state/default (pid 26893).

    2013-06-12 22:18:48.000 INFO [native] transmitted stay application.

    2013-06-12 22:18:48.000 INFO [native] Meanwhile the process of "AgentManager.

    (pid 26893) stopped

    I'll just kill him at this time, but I had to know exactly, what happened with her. It is not the first report of the fglam power issues I've had.

    You can start with a beam of support from fglam and then analyze it to see if the repetition of messages are written.

    How long you wait for the fglam to terminate?

    David Mendoza

Maybe you are looking for