Sql query hangs close to the end

Hi:
I am on 10.2.0.3.
My rather simple query hangs for a few minutes close to the end. It's supposed to return 288 rows and it immediately returns 285, then hangs for 4-5 min, than returns the remaining 3 rows. Kind of similar behavior to using "First_rows" hint - which I'm not using...
The table has about 100,000 rows.
Some relevant info is below.
Any ides appreciated.
TIA
PLAN_TABLE_OUTPUT
Plan hash value: 2481764356
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 30 | 3 (0)| 00:00:01 |
|* 1 | INDEX RANGE SCAN| PSACOMBO_DATA_TBL | 1 | 30 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("SETID"='GLOBL' AND "PROCESS_GROUP"='100ACDTPRJ' AND
"COMBINATION"='100ACDTPRJ' AND "VALID_CODE"='V')
optimizer_dynamic_sampling integer 6
optimizer_features_enable string 10.2.0.3
optimizer_index_caching integer 25
optimizer_index_cost_adj integer 75
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
unnestsubquery boolean FALSE

You said the query is supposed to return 288 rows, but from the explain plan, Oracle "see" only 1 row to be returned. Are the stats up-to-date ? What's the actual query ?
Please, on the forum side, use tags before and after your code to keep it readable (preserve blanks and tabs).
Nicolas.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Sql query to identify all the responsibilities attached to a form

    (oracle - apps) Can anyone help me by giving a sql query to identify all the responsibilities attached to a form and corresponding menu should not be in the menu exclusion.
    Thanks in advance
    Venki

    Bump

  • SQL query  which return all the NET SERVICES which are avaiable in tnsname

    hi all
    how to write a sql query which return all the net services which are avaiable in tnsname.ora
    Regards
    s

    Also, tnsnames.ora is stored on the client, and not necessarily on the server; it's possible (and quite likely) that the name I use for a database in my tnsnames.ora could be different from the name you use for the same database; conversely we might use the same name for two different databases.
    Regards Nigel

  • SQL Query involved to Generate the reports

    Hi,
    I have created Vendor report which internally refers two tables from the vendor and store table (Both the tables are not directly Joined each other)
    i want to see the SQL Query involved to generate the report.
    where can i see that?
    Regards,
    Prasanthi

    in nqquery.log file:
    10g -> $BI_ORACLE_HOME/server/Log
    11g -> $ORACLE_INSTANCE/diagnostics/logs/OracleBIServerComponent/coreapplication_obis1

  • OTL I am trying to wright a SQL query that will return the date the timesheet was submitted and date/time it was approved, can anyone guide me on this?

    Hi
    I am trying to wright a SQL query that will return the date the timesheet was submitted and date/time it was approved, can anyone guide me on this?
    I basically need person name who submitted, date - time it was submitted for approval, then the person who approved it and the date - time that it was approved
    Thanks
    Ruby

    Ruby,
    you can start with HXC_TIMECARD_SUMMARY table for submitter detail. But for approver details, i think you need WF tables to get the data for item type HXCEMP.

  • SQL Query to return all the dependent objects

    Hi,
    I have a question.
    Suppose I am creating a table with a join on 10 other tables, views etc..
    And there are nested sub-queries in the CREATE statement.
    How can I get the list of all the dependent objects for that table without counting them manually.
    I know, we can right click the table/view name and check the dependent objects in Toad or SQL Developer.
    But, I want to know the SQL query for getting that information.
    Thanks
    Rajiv

    well there is no way oracle would know what query was used when the table was created.
    But here is one intuitive trick:
    Step 1: Create a procedure that will have a cursor declared on the query you want to know what tables/views are used.
    Step 2: Check USER_DEPENDENCIES to see what objects this procedure depends on
    Let say you want to create TEST_A table using the following statement:
    create table test_a
    as
    select *
    from scott.emp,
         scott.dept;
      1  create or replace procedure test_temp
      2  as
      3  cursor test_cur is
      4             select *
      5             from scott.emp,
      6                  scott.dept;
      7  begin
      8     null;
      9* end;
    SQL> /
    Procedure created.
    SQL> show errors
    No errors.
    SQL> desc user_dependencies
    Name                                      Null?    Type
    NAME                                      NOT NULL VARCHAR2(30)
    TYPE                                               VARCHAR2(17)
    REFERENCED_OWNER                                   VARCHAR2(30)
    REFERENCED_NAME                                    VARCHAR2(64)
    REFERENCED_TYPE                                    VARCHAR2(17)
    REFERENCED_LINK_NAME                               VARCHAR2(128)
    SCHEMAID                                           NUMBER
    DEPENDENCY_TYPE                                    VARCHAR2(4)
    SQL> select referenced_owner, referenced_name, referenced_type
      2  from user_dependencies
      3  where name='TEST_TEMP' and referenced_owner<>'SYS';
    REFERENCED_OWNER
    REFERENCED_NAME
    REFERENCED_TYPE
    SCOTT
    DEPT
    TABLE
    SCOTT
    EMP
    TABLE
    SQL>
    SQL> drop procedure test_temp;
    Procedure dropped.
    SQL>Message was edited by:
    tekicora
    Message was edited by:
    tekicora

  • Sql query hangs..

    Hi,
    the below query is getting hanged repetedly although the update is happening but its very slow(taking more than 12 hrs )
    Please tell the issue.the indexes are prope and table Test1 is going for full table scan.
    update Test1 t1 set t1.A =
    select t2.ID from Test2 t2 where t1.A = t2.c and t2.c is not null
    and t1.d = 58 and t1.e ='Text' and t1.f=t2.g
    )where exists
    select t2.ID from Test2 t2 where t1.A = t2.c and t2.c is not null
    and t1.d = 58 and t1.ORIG_OU_ID ='Text' and t1.f=t2.g
    Thanks.

    Welcome to the forums !
    When your query takes too long:
    HOW TO: Post a SQL statement tuning request - template posting
    When your query takes too long ...
    HTH
    Srini

  • Safari hangs right at the end trying to dowload driver for epson. Its says 1 sec left but does dont end the down load and just hangs

    cant finish the dowload for epson drivers in Maverick . It just hangs at the end.

    Are you downloading from here?
    http://www.epson.com/cgi-bin/Store/support/supDetail.jsp?BV_UseBVCookie=yes&oid= 171983&prodoid=63089641&infoType=Downloads&detected=yes&platform=OSF_M_X9
    Barry
    P.S.  I cannot think of anything that would make Safari hang on only one site....

  • How to use sql:query/ tag to retrive the system date?

    hi all,
    i want to know if i can use the <sql:query/> tag in jstl to get the database server time. please send me a code snippet to retrive n display the result. i'm new to jstl tags. please help.
    thank you,
    AM

    Check out the first hits: http://www.google.com/search?q=jstl+sql+tutorial+site:sun.com

  • Sql query to find out the space issues in not able to allocate next extent

    hi,
    i have oracel 11g on linux.
    my datafiles are autoextend off. i am looking for query to make sure the segments does not stop growing by reaching the maximum segment allocated or no free contigous space available in allocating new extent,.
    i need to know periodically the owner,object_name and object type (table or index) which are suffocating for space.
    any ad-hoc sql query exists?
    thanks in advance.

    Connect as sysdba and try..
    To list all objects >100M in size.
    SQL> select owner, segment_type, segment_name, sum(bytes)/(1024*1021) from dba_segments
    group by owner, segment_type, segment_name
    having sum(bytes)/(1024*1021) > 100
    For tablespaces ..
    select tablespace_name, sum(bytes) tablespace_size
    from dba_data_files
    group by tablespace_name
    union all
    select tablespace_name, sum(bytes) tablespace_size
    from dba_temp_files
    group by tablespace_name
    order by tablespace_name

  • Looking for a SQL query to get all the possible Alert Messages from the Rules in a Management Pack

    For reporting, I'm looking to get a SQL query of all the possible Alert Messages for Rules configured in a Management Pack (not necessarily the ones that have thrown alerts).  I can do this for Monitors, but not for Rules. 
    The configured alert messages for the Management Pack Monitors
    go like this:  ManagementPack > MonitorView> RuleModule > RuleModule.Alert Message > Localized Text
    The configured alert messages for the Management Pack Rules
    should go something like this, but there is a missing link:  ManagementPack > RuleView > RuleModule > ? Missing Link ? > Localized Text
    The Rules are tied to the Module, but I don't see a connection from the RulesModule to the Alert Message that I see in the LocalizedText. The Rule names do not always equal the Alert name. 
    Can someone provide the missing link?

    Hi,
    please try below powershell code to find the corresponding management pack for specific alert:
    $Alert = get-scomalert | where {$_.Name -like 'Agent Proxy Not Enabled*'} | select -first 1
    If ($alert.IsMonitorAlert -eq "True") {
    write-host "Ths is a monitor-generated alert"
    get-scommonitor -ID $Alert.MonitoringRuleID | select Enabled, DisplayName, ManagementPack
    else
    write-host "This is a rule-generated alert"
    get-scomrule -ID $Alert.MonitoringRuleID | select Enabled, DisplayName, ManagementPack
    In addition, please also refer to the below link:
    http://blogs.technet.com/b/mazenahmed/archive/2011/12/02/using-powershell-to-map-opsmgr-active-alert-to-its-corresponding-rule-monitor-and-management-pack-name.aspx
    Regards,
    Yan Li
    Regards, Yan Li

  • SQL query optimization by changinf the WHERE clause

    Hi all,
    I need to know about the SQL query performance improvement by changing the WHERE clause. Consider a query :
    select * from student where country ='India' and age = 20
    Say, country = 'India' filters 100000 records and age = 20 filters 2000 records if given one by one. Now can anyone tell if the performance of the query can be changed by changing the query like this :
    select * from student where age = 20 and country ='India'
    as first where clause will give 2000 results and next filter will be applicable on only 2000 rows. While in the former query first where clause would give 100000 rows and seconde filter, hence, would be applicable on 100000 rows???
    Kindly explain.
    Thanks in advance.
    Abhideep

    in general the order of the where condition should not be important. However there are a few exeptions where sometimes it might play a role. Sometimes this is called order of filter conditions. Among others it depends on RBO or CBO used, Oracle Version, Indexes on the columns, statistic information on the table and the columns, CPU statistics in place etc.
    If you want to make this query fast and you know that the age column has much better selectivity then you can simply put an index on the age column. An index on the country column is probably not useful at all, since to little different values are in this column. If you are already in 11g I would suggest to use a composite index on both columns with the more selective in first position.
    Edited by: Sven W. on Nov 17, 2008 2:23 PM
    Edited by: Sven W. on Nov 17, 2008 2:24 PM

  • Sql query extremely slow in the new linux environment , memory issues?

    We just migrated to a new dev environment in Linux REDHAT5, and now the query is very slow, and I used the TOAD to run the query, it took like 700 msecond to finish, however from any server connection, the sql query takes hours to finish.
    I checked toad monitor, it said need to increase db_buffer_cache and shared pool too small.
    Also three red alert from toad is:
    1. Library Cache get hit ratio: Dynamic or unsharable sql
    2. Chained fetch ratio: PCT free too low for a table
    3. parse to execute ratio: HIgh parse to execute ratio.
    App team said it ran real quick in the old AIX system, however I ran it in old system, and monitored in the toad, it gave me all same 5 red alerts in old system, and it did provide query results a lot quicker though.
    Here is the parameters in the old system (11gr1 on AIX):
    SQL> show parameter target
    NAME TYPE VALUE
    archive_lag_target integer 0
    db_flashback_retention_target integer 1440
    fast_start_io_target integer 0
    fast_start_mttr_target integer 0
    memory_max_target big integer 0
    memory_target big integer 0
    pga_aggregate_target big integer 278928K
    sga_target big integer 0
    SQL> show parameter shared
    NAME TYPE VALUE
    hi_shared_memory_address integer 0
    max_shared_servers integer
    shared_memory_address integer 0
    shared_pool_reserved_size big integer 31876710
    shared_pool_size big integer 608M
    shared_server_sessions integer
    shared_servers integer 0
    SQL> show parameter db_buffer
    SQL> show parameter buffer
    NAME TYPE VALUE
    buffer_pool_keep string
    buffer_pool_recycle string
    db_block_buffers integer 0
    log_buffer integer 2048000
    use_indirect_data_buffers boolean FALSE
    SQL>
    In new 11gr2 Linux REDHAT parameter:
    NAME TYPE VALUE
    archive_lag_target integer 0
    db_flashback_retention_target integer 1440
    fast_start_io_target integer 0
    fast_start_mttr_target integer 0
    memory_max_target big integer 2512M
    memory_target big integer 2512M
    parallel_servers_target integer 192
    pga_aggregate_target big integer 0
    sga_target big integer 1648M
    SQL> show parameter shared
    NAME TYPE VALUE
    hi_shared_memory_address integer 0
    max_shared_servers integer
    shared_memory_address integer 0
    shared_pool_reserved_size big integer 28M
    shared_pool_size big integer 0
    shared_server_sessions integer
    shared_servers integer 1
    SQL> show parameter buffer
    NAME TYPE VALUE
    buffer_pool_keep string
    buffer_pool_recycle string
    db_block_buffers integer 0
    log_buffer integer 18857984
    use_indirect_data_buffers boolean FALSE
    SQL>
    Please help. Thanks in advance.

    Duplicate question. Originally posted in sql query slow in new redhat enviornment
    Please post in just one forum.

  • Sql Query need to extract the Work Flow information from Hyperion Planning

    Can Any one give me the sql query to extract the Work flow from Hyperion Planning in 11.1.2.1.
    I can extract from the Hyperion Planning but it is not in required format again I need to do lot of formating. I need the information as per the flow structure is showing linke in one perticular planning unit in all coloumn format. Hence only sql query will help me to extract this kind of information. could any one provide the sql query to extract this kind of request.
    Thanks in Advance.
    Edited by: 987185 on Feb 9, 2013 10:57 PM

    If you have a look at the data models in - http://www.oracle.com/technetwork/middleware/bi-foundation/epm-data-models-11121-354684.zip
    There is the structure of the planning application tables, have a look at the HSP_PM_* tables
    Alternatively you can look at extracting the information using LCM.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Sql query runs slower from the application

    Hi,
    We are using oracle 9ias on AIX box.The jdk version used: 1.3.1 . From the j2ee application when we perfom a search, the sql query takes for ever to return the results. I know that we are waiting on the database because I can see the query working when I look at TOAD.But if i run the same query on the database server itself, it returns the results in less than a sec. Could you guys throw some light on how we could troubleshoot this problem. Thanks.

    When the results have to travel over the network, it is slow, and when they don't, it is fast.
    That is what you are saying, correct?
    So your approach should be to not bring so much data over the network. Don't select columns you don't need, and don't select rows you don't need.

Maybe you are looking for

  • Dvd won't play in dvd players

    I am trying to burn a dvd from encore 2 and have it play in a dvd player. So far I have not gotten it to work in one. I am bringing it in from premiere pro as a mpeg-2 using one of their presets. I also tried using an avi and transcoding it in encore

  • Control on Project Codes

    Guys, Is there any possible ways to control the project viewing(in all the T Codes w.r.t project and project related reports) with respect to each division in the construction industry (division treated as plant).  For each plant, a project profile h

  • Perfomance problem

    Hello All, The below mentioned query is a part of one trigger. When i execute this query directly, it is is taking fraction of seconds, but when I am trying to save the data through oracle forms, which in turn invokes triggers and then this query, th

  • .MTS = Unknown Compression Type ??

    Just upgraded to the newest PPro 2014.1 release that just came out. And now I'm unable to import or view or in any other way work with AVCHD files (.MTS). What on earth is going on? Been editing these files for 5+ years without issue, this only start

  • Exception while handling service request: org/apache/soap/Envelope

    Hi all, i´ve tried to run a message style webservice . Now i always get following Error: Exception while handling service request: org/apache/soap/Envelope Can anyone tell me what i should do? I use Bea 6.1 and Apache Soap 2.2 I have deployed the Web