Select Query Hangs / No DB Locks / Query Plan is good

I have below query in application which hangs ( Only sometimes ) and there are some session which also try to insert data into this tables also starts getting hanged.
SELECT DISTINCT F2 || ' - ' || F3 || ' - ' || F4
FROM Table1
WHERE F4 = 6160
AND F1|| F2|| F3 NOT IN (
SELECT F2|| F3 || F4
FROM Table2
WHERE F1 = 181)
F2 - varchar(4)
F3- varchar(100)
F4- varchar(20)
F1,F1 are NUMBER
Table1 has one unique index comprising all fields in ORDER F1,F2, X,F3, F4,Y - X,Y are some different field.
Table2 has one unique index comprising all fields in ORDER F1,F3, F4,F2 are some different field.
Below are facts from DBA ----
1- Session Query Plan was excellent -
2 - No tables were locked in DB
3 - Statistics on this table Table1 was calculated on Feb, 2008 and shows 8 millions rows but actual current row count is 13 million. DBA says sometime analyzing statistics again may cause poor query performance.
4- There were 8 session in DB, 1 was for above select statement and other 7 were trying to insert data into above table.
Can you please advise what could else be verified to root cause issue as it has been hanging many times - hence causing other session to hang ?
Many Thanks

Can you clarify exactly what the DBA meant by "No tables were locked in DB"? What was the exact query that was used to determine this? Was it hitting V$LOCK (GV$LOCK in a RAC system)? Or the DBA_BLOCKERS and DBA_WAITERS tables? Or something else? The specific query here is important because there is a world of difference between a row-level lock and a table-level lock. Of course, locks would never prevent a SELECT statement from running, but it could cause problems for the INSERT statements.
I strongly concur with Old DBA's suggestion about refactoring the query to not do the concatenation in the NOT IN clause.
Are the F4 = 6160 and F1 = 181 conditions really using hard-coded numeric literals? Or are these bind variables? Is the data in F1 or F4 skewed-- that is, are there certain values that are more likely than other values?
How many rows would you expect to be in Table1 with an F4 value of 6160? How many rows in Table2 with a F1 value of 181?
Justin

Similar Messages

  • Select filter value..not opening..query hanging

    Hi,
    I have a queary and it is executing fine. After executing it is displaying data fine. I have company code and two more characterstics in free characterstics section. After executing the report i am doing right click at company code in the excel sheet and selecting the option 'select filter value'. It is then opening the small screen 'selection for company code' but it is not displaying the values. It's keep on running and after some time it is hanging (not responding).
    In the company code object hardly there are 60 values. Can anyone tell me why this is taking long time and result in hanging for just 60 values?
    This company code object is Authorisation relevant checked in the 'Business Explorer' tab. There is a variable used for this comopany code in the query design and this variable is processed by authorisation. But i dont think this is the reason for the issue. If this is the reason could you please tell me how it effects? Please suggest me the solution.
    Many Thanks in advance
    K
    Edited by: kirankumar chandaluri on Jun 17, 2008 5:38 PM

    Hi MA,
    Thanks for your immedieate reply.
    In the business explorer tab for which one you are asking to change the settings?
    Is it for   'query def. filter value selection'
                              OR
                 'query execution filter value selection'?
    The current status is:
    Query Def. filter value selection is 'values in Master data table'                 &
    Query Execution filter value selection is 'only posted values for navigation'.
    This is not cube but this is ODS. For ODS where do we set DB specfic settings?
    Thanks in advance
    Kiran

  • Characteristic selected in Dropdown box does not influence planning query

    Dear all,
    We have a problem filling all the characteristics in a planning query to make it possible to plan, inside a BEx Layout.
    We are using Dropdown boxes to restrict the characteristics in the query so it can be able to plan. Only when we put the characteristic in the lines of the query it is able to being able to plan on the required conditions. This results in a query with many characteristics in the lines and therefore unattractive to the users. We believe that it should be possible to restrict the characteristics in the query by drop-down box. Can you explain us how to achieve this restriction in the planning query.
    Kind Regards,
    Mazzz

    Hi Mazzz,
    you have to insert a dropdown menu, link it to one dataprovider (maybe the same of the query) ad set some simple paramiters in dropdown (chose characteristic end so on..)
    hope this helps
    Michele

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

  • Query hangs with outer query

    Hi,
    OS: SPARC 64 bit
    Oracle Version: 10.2.0.3.0 64 bit
    My query hangs when I include the outer query. When I execute without outer query It comes out in a fraction of second but when I includes outer query it starts hang
    Below is my original query which hangs
    select * from (select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
    AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
    ('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000) WHERE raw_rnum_ > 0;
    when I execute this it will come out immediately
    select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
    AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
    ('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000
    select * from (select raw_sql_.**, rownum raw_rnum_ from (SELECT /*+ FIRST_ROWS */ NETWORK_ID||'","'||CALLER_NUMBER||'","'||CALLED_NUMBER FROM CDR FROM CDR WHERE 1 = 1
    AND day_of_year = 99 AND INTERFACE = 'TRAFIC' AND TIME_STAMP BETWEEN to_date('2009/04/08 00:00:00','yyyy/mm/dd hh24:mi:ss') AND to_date
    ('2009/04/09 00:00:00','yyyy/mm/dd hh24:mi:ss') AND NETWORK_ID IN (1025,1026) order by id desc) raw_sql_ WHERE rownum <= 10000) WHERE raw_rnum_ > 0;
    but when I includes outer query I hangs it is really very weird for me?
    Here is the explain plan for that query
    Execution Plan
    Plan hash value: 3493649369
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 2015 | 1 (0)| 00:00:01 | | |
    |* 1 | VIEW | | 1 | 2015 | 1 (0)| 00:00:01 | | |
    |* 2 | COUNT STOPKEY | | | | | | | |
    | 3 | PARTITION RANGE SINGLE | | 1 | 5894 | 1 (0)| 00:00:01 | 99 | 99 |
    | 4 | PARTITION LIST ALL | | 1 | 5894 | 1 (0)| 00:00:01 | 1 | 48 |
    |* 5 | TABLE ACCESS BY LOCAL INDEX ROWID| CDR | 1 | 5894 | 1 (0)| 00:00:01 | 4705 | 4752 |
    | 6 | BITMAP CONVERSION TO ROWIDS | | | | | | | |
    |* 7 | BITMAP INDEX SINGLE VALUE | IX_CDR_INTERFACE | | | | | 4705 | 4752 |
    Predicate Information (identified by operation id):
    1 - filter("RAW_RNUM_">0)
    2 - filter(ROWNUM<=10000)
    5 - filter("DAY_OF_YEAR"=99 AND "TIME_STAMP">=TO_DATE('2009-04-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND
    "TIME_STAMP"<=TO_DATE('2009-04-09 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND ("NETWORK_ID"=1025 OR
    "NETWORK_ID"=1026))
    7 - access("INTERFACE"='TRAFIC')
    can one explain why it happen? what could be the reason? Is it a bug or something? what should I do now? Issue is critical in the production enviromentent
    Waiting for your Valuable Reply
    Thanks In Advance
    With Regards
    Boo

    user454189 wrote:
    I suspect the issue with the where clause (raw_rnum_ > 0)
    Actually I using bitmap index on ' INTERFACE' column. Does it causing a prob or raw_rnum_ causing a problem?Boo,
    a couple of comments:
    1. Why do you use the deprecated FIRST_ROWS hint? From 9i on the FIRST_ROWS_n mode should be used instead, and since you're using a top-N query format the hint should be superfluous anyway since the optimizer should switch to FIRST_ROWS_n mode automatically.
    2. Why do you use a BITMAP index and not a conventional b*tree index? Let me hazard a guess: Because the INTERFACE column has a small number of distinct values? That would be in most cases a bad idea.
    3. What seems to be odd that you're accessing the data via the BITMAP index on INTERFACE, but request an ORDER BY ID DESC. But there is no order by in the execution plan posted. I wonder where the order should come from? Can you show us the DDL of the bitmap index?
    4. What does the plan look like if you run only the inner query without the outer query?
    You can always gain more information by tracing the statement execution or using the GATHER_PLAN_STATISTICS hint together with the DBMS_XPLAN.DISPLAY_CURSOR function.
    Please read this HOW TO: Post a SQL statement tuning request - template posting that explains what you should provide if you have SQL statement tuning question and how to format it here so that the posted information is readable by others.
    This accompanying blog post shows step-by-step instructions how to obtain that information.
    Regards,
    Randolf
    Oracle related stuff blog:
    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/

  • Query tunning in Oracle using Explain Plan

    Adding to my below question: I have now modified the query and the path shownby 'Explain plan' has reduced. The 'Time' column of plan_table is also showing much lesser value. However, some people are suggesting me to consider the time required by the query to execute on Toad. Will it be practical? Please help!!
    Hi, I am using Oracle 11g. I need to optimize a Select query(Need to minimize the execution time). I need to know how 'Explain Plan' would help me. I know how to use Explain Plan command. I refer Plan_table table to see the details of the plan. Please guide me regarding which columns of the Plan_table should be considered while modifying the query for optimization. Some people say, 'Time' column should be considered, some say 'Bytes' etc. Some suggest on minimizing the full table scans, while some people say that I should minimize the total no. operations (less no. of rows should be displayed in Plan_table). As per an experienced friend of mine, full table scans should be reduced (for e.g. if there are 5 full table scans in the plan, then try to reduce them to less than 5. ). However, if I consider any full table scan operation in the plan_table, its shows value of 'time' column as only 1 which is very very less. Does this mean the full scan is actually taking very less time?? If yes, then this means full table scans are very fast in my case and no need to work on them. Some articles suggest that plan shown by 'Explain Plan' command is not necessarily followed while executing the query. So what should I look for then? How should I optimize the query and how will I come to know that it's optimized?? Please help!!...
    Edited by: 885901 on Sep 20, 2011 2:10 AM

    885901 wrote:
    Hi, I am using Oracle 11g. I need to optimize a Select query(Need to minimize the execution time). I need to know how 'Explain Plan' would help me. I know how to use Explain Plan command. I refer Plan_table table to see the details of the plan. Please guide me regarding which columns of the Plan_table should be considered while modifying the query for optimization. Some people say, 'Time' column should be considered, some say 'Bytes' etc. Some suggest on minimizing the full table scans, while some people say that I should minimize the total no. operations (less no. of rows should be displayed in Plan_table). As per an experienced friend of mine, full table scans should be reduced (for e.g. if there are 5 full table scans in the plan, then try to reduce them to less than 5. ). However, if I consider any full table scan operation in the plan_table, its shows value of 'time' column as only 1 which is very very less. Does this mean the full scan is actually taking very less time?? If yes, then this means full table scans are very fast in my case and no need to work on them. Some articles suggest that plan shown by 'Explain Plan' command is not necessarily followed while executing the query. So what should I look for then? How should I optimize the query and how will I come to know that it's optimized?? Please help!!...how fast is fast enough?

  • Query Hangs while Parsing

    In one of our databases, one of the Select query hangs at the parsing stage. The query was working fine few days back. How and what can be traced to see the cause of this hang. Database is in 10.2.0.3 and statistics has been gathered for all the affected tables.

    Thanks for the info. The SEQ# is not changing in the v$session_waits. I have found a workaround for this problem. If I delete the statistics for CS_MEASUREMENT table, the query gets executed in .35 secs! If i collect stats again and runs, it hangs.
    The session trace below.
    TKPROF: Release 10.2.0.3.0 - Production on Fri May 30 11:43:02 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Trace file: css1cldr_ora_10134.trc
    Sort options: default
    count = number of times OCI procedure was executed
    cpu = cpu time in seconds executing
    elapsed = elapsed time in seconds executing
    disk = number of physical reads of buffers from disk
    query = number of buffers gotten for consistent read
    current = number of buffers gotten in current mode (usually for update)
    rows = number of rows processed by the fetch or execute call
    select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.flags,i.property,
    i.pctfree$,i.initrans,i.maxtrans,i.blevel,i.leafcnt,i.distkey,i.lblkkey,
    i.dblkkey,i.clufac,i.cols,i.analyzetime,i.samplesize,i.dataobj#,
    nvl(i.degree,1),nvl(i.instances,1),i.rowcnt,mod(i.pctthres$,256),
    i.indmethod#,i.trunccnt,nvl(c.unicols,0),nvl(c.deferrable#+c.valid#,0),
    nvl(i.spare1,i.intcols),i.spare4,i.spare2,i.spare6,decode(i.pctthres$,null,
    null,mod(trunc(i.pctthres$/256),256)),ist.cachedblk,ist.cachehit,
    ist.logicalread
    from
    ind$ i, ind_stats$ ist, (select enabled, min(cols) unicols,
    min(to_number(bitand(defer,1))) deferrable#,min(to_number(bitand(defer,4)))
    valid# from cdef$ where obj#=:1 and enabled > 1 group by enabled) c where
    i.obj#=c.enabled(+) and i.obj# = ist.obj#(+) and i.bo#=:1 order by i.obj#
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.00 0 0 0 0
    Execute 3 0.01 0.01 0 0 0 0
    Fetch 10 0.00 0.00 0 33 0 7
    total 14 0.02 0.02 0 33 0 7
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    2 SORT ORDER BY (cr=10 pr=0 pw=0 time=2852 us)
    2 HASH JOIN OUTER (cr=10 pr=0 pw=0 time=2741 us)
    2 NESTED LOOPS OUTER (cr=7 pr=0 pw=0 time=102 us)
    2 TABLE ACCESS CLUSTER IND$ (cr=5 pr=0 pw=0 time=73 us)
    1 INDEX UNIQUE SCAN I_OBJ# (cr=2 pr=0 pw=0 time=29 us)(object id 3)
    0 TABLE ACCESS BY INDEX ROWID IND_STATS$ (cr=2 pr=0 pw=0 time=22 us)
    0 INDEX UNIQUE SCAN I_IND_STATS$_OBJ# (cr=2 pr=0 pw=0 time=18 us)(object id 711)
    2 VIEW (cr=3 pr=0 pw=0 time=361 us)
    2 SORT GROUP BY (cr=3 pr=0 pw=0 time=356 us)
    2 TABLE ACCESS CLUSTER CDEF$ (cr=3 pr=0 pw=0 time=58 us)
    1 INDEX UNIQUE SCAN I_COBJ# (cr=2 pr=0 pw=0 time=25 us)(object id 30)
    select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#,
    sample_size, minimum, maximum, distcnt, lowval, hival, density, col#,
    spare1, spare2, avgcln
    from
    hist_head$ where obj#=:1 and intcol#=:2
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 50 0.01 0.00 0 0 0 0
    Fetch 50 0.00 0.00 0 150 0 50
    total 101 0.01 0.01 0 150 0 50
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: RULE
    Parsing user id: SYS (recursive depth: 2)
    Rows Row Source Operation
    1 TABLE ACCESS BY INDEX ROWID HIST_HEAD$ (cr=3 pr=0 pw=0 time=81 us)
    1 INDEX RANGE SCAN I_HH_OBJ#_INTCOL# (cr=2 pr=0 pw=0 time=57 us)(object id 257)
    select /*+ rule */ bucket, endpoint, col#, epvalue
    from
    histgrm$ where obj#=:1 and intcol#=:2 and row#=:3 order by bucket
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 60 0.03 0.01 0 0 0 0
    Fetch 60 0.01 0.00 0 206 0 973
    total 121 0.04 0.02 0 206 0 973
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: RULE
    Parsing user id: SYS (recursive depth: 2)
    Rows Row Source Operation
    3 SORT ORDER BY (cr=3 pr=0 pw=0 time=130 us)
    3 TABLE ACCESS CLUSTER HISTGRM$ (cr=3 pr=0 pw=0 time=66 us)
    1 INDEX UNIQUE SCAN I_OBJ#_INTCOL# (cr=2 pr=0 pw=0 time=27 us)(object id 252)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 1 0.00 0.00
    SQL*Net message from client 1 10.13 10.13
    select pos#,intcol#,col#,spare1,bo#,spare2
    from
    icol$ where obj#=:1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 7 0.01 0.00 0 0 0 0
    Fetch 25 0.00 0.00 0 50 0 18
    total 33 0.01 0.00 0 50 0 18
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    2 TABLE ACCESS BY INDEX ROWID ICOL$ (cr=6 pr=0 pw=0 time=36 us)
    2 INDEX RANGE SCAN I_ICOL1 (cr=4 pr=0 pw=0 time=38 us)(object id 40)
    select name,intcol#,segcol#,type#,length,nvl(precision#,0),decode(type#,2,
    nvl(scale,-127/*MAXSB1MINAL*/),178,scale,179,scale,180,scale,181,scale,182,
    scale,183,scale,231,scale,0),null$,fixedstorage,nvl(deflength,0),default$,
    rowid,col#,property, nvl(charsetid,0),nvl(charsetform,0),spare1,spare2,
    nvl(spare3,0)
    from
    col$ where obj#=:1 order by intcol#
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 3 0.00 0.01 0 0 0 0
    Fetch 87 0.00 0.00 0 11 0 84
    total 91 0.00 0.01 0 11 0 84
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    12 SORT ORDER BY (cr=3 pr=0 pw=0 time=157 us)
    12 TABLE ACCESS CLUSTER COL$ (cr=3 pr=0 pw=0 time=79 us)
    1 INDEX UNIQUE SCAN I_OBJ# (cr=2 pr=0 pw=0 time=24 us)(object id 3)
    select col#, grantee#, privilege#,max(mod(nvl(option$,0),2))
    from
    objauth$ where obj#=:1 and col# is not null group by privilege#, col#,
    grantee# order by col#, grantee#
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 3 0.00 0.00 0 0 0 0
    Fetch 3 0.00 0.00 0 6 0 0
    total 7 0.00 0.00 0 6 0 0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    0 SORT GROUP BY (cr=2 pr=0 pw=0 time=57 us)
    0 TABLE ACCESS BY INDEX ROWID OBJAUTH$ (cr=2 pr=0 pw=0 time=34 us)
    0 INDEX RANGE SCAN I_OBJAUTH1 (cr=2 pr=0 pw=0 time=31 us)(object id 103)
    select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0),2))
    from
    objauth$ where obj#=:1 group by grantee#,privilege#,nvl(col#,0) order by
    grantee#
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 3 0.00 0.00 0 0 0 0
    Fetch 18 0.00 0.00 0 12 0 15
    total 22 0.00 0.00 0 12 0 15
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    5 SORT GROUP BY (cr=4 pr=0 pw=0 time=107 us)
    5 TABLE ACCESS BY INDEX ROWID OBJAUTH$ (cr=4 pr=0 pw=0 time=43 us)
    5 INDEX RANGE SCAN I_OBJAUTH1 (cr=2 pr=0 pw=0 time=16 us)(object id 103)
    select con#,obj#,rcon#,enabled,nvl(defer,0)
    from
    cdef$ where robj#=:1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 3 0.01 0.00 0 0 0 0
    Fetch 3 0.00 0.00 0 3 0 0
    total 7 0.01 0.00 0 3 0 0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    0 TABLE ACCESS BY INDEX ROWID CDEF$ (cr=1 pr=0 pw=0 time=22 us)
    0 INDEX RANGE SCAN I_CDEF3 (cr=1 pr=0 pw=0 time=20 us)(object id 52)
    select con#,type#,condlength,intcols,robj#,rcon#,match#,refact,nvl(enabled,0),
    rowid,cols,nvl(defer,0),mtime,nvl(spare1,0)
    from
    cdef$ where obj#=:1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 3 0.00 0.00 0 0 0 0
    Fetch 34 0.00 0.00 0 42 0 31
    total 38 0.00 0.00 0 42 0 31
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    5 TABLE ACCESS CLUSTER CDEF$ (cr=9 pr=0 pw=0 time=17 us)
    1 INDEX UNIQUE SCAN I_COBJ# (cr=2 pr=0 pw=0 time=10 us)(object id 30)
    select intcol#,nvl(pos#,0),col#,nvl(spare1,0)
    from
    ccol$ where con#=:1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 31 0.01 0.00 0 0 0 0
    Fetch 70 0.00 0.00 0 140 0 39
    total 102 0.01 0.00 0 140 0 39
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    2 TABLE ACCESS BY INDEX ROWID CCOL$ (cr=6 pr=0 pw=0 time=49 us)
    2 INDEX RANGE SCAN I_CCOL1 (cr=4 pr=0 pw=0 time=45 us)(object id 54)
    select condition
    from
    cdef$ where rowid=:1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.00 0.00 0 2 0 1
    total 3 0.00 0.00 0 2 0 1
    Misses in library cache during parse: 0
    Optimizer mode: CHOOSE
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    1 TABLE ACCESS BY USER ROWID CDEF$ (cr=1 pr=0 pw=0 time=18 us)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 0 0.00 0.00 0 0 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 0 0.00 0.00 0 0 0 0
    Misses in library cache during parse: 0
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 1 0.00 0.00
    SQL*Net message from client 1 10.13 10.13
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call count cpu elapsed disk query current rows
    Parse 11 0.01 0.01 0 0 0 0
    Execute 167 0.08 0.07 0 0 0 0
    Fetch 361 0.01 0.01 0 655 0 1218
    total 539 0.10 0.10 0 655 0 1218
    Misses in library cache during parse: 10
    Misses in library cache during execute: 10
    0 user SQL statements in session.
    167 internal SQL statements in session.
    167 SQL statements in session.
    Trace file: css1cldr_ora_10134.trc
    Trace file compatibility: 10.01.00
    Sort options: default
    1 session in tracefile.
    0 user SQL statements in trace file.
    167 internal SQL statements in trace file.
    167 SQL statements in trace file.
    11 unique SQL statements in trace file.
    3548 lines in trace file.
    0 elapsed seconds in trace file.

  • Error:  Due to a lock, query cannot be executed at the moment

    Hi,
    I am getting the following error when executing my query:
    Error:  Due to a lock, query cannot be executed at the moment
    Abort System error in program SAPLRSDRC and form /BIC/ZABC_01
    The query has been running fine for the past few months.
    Can anyone explain why this error occured and what can I do to avoid this?
    Thanks in Advance!!
    Regards,
    Swapna

    Hi Swapna,
    make sure that the BW system (e.g. another user, process, ...) does not have currently access to the data e.g. like maintain data. In this case the BW sets a lock so that the current user gets exclusively access to the table.
    Check the table if there are any locks on it. Call transaction SU53 and check your table for any locks.
    Check this thread, perhaps you will find some more information there:
    https://forums.sdn.sap.com/click.jspa?searchID=3180428&messageID=1088573
    Hope this helps.
    Regards,
    Marco

  • Select List based on in-line query

    Hello everyone, im having a problem creating a select list with the following query:
    select result.A d, result.B r
    from dual,
    (select RMF.nome A, RMF.chapa B
    from
    medfa_marco_has_colaborador MC,
    medfa_projeto_has_colaborador MP,
    rm_funcionario RMF
    where
    MC.mar_id = :P3_SELECT_MARCO and
    MC.pro_col_id = MP.pro_col_id and
    MP.chapa = RM.chapa) result
    but i keep getting the
    "LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query."
    Thnx in advance.
    E.R

    Okay, first off - does this work in SQL Workshop?
    Have you got a semi-colon at the end of the query (you shouldn't have)?
    Also when posting code put {noformat}{noformat} before and after your code to preserve formatting and spacing.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    +Don't forget to mark replies helpful or correct+ ;)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Oracle 9.2.0.6; query hangs if partition doesn't exist

    Hallo all,
    this is the first time I post on this forum.
    I work in a group of PL\SQL developers in Italy. Few day ago we had a problem with a query and like to find out what the problem is.
    We have an Oracle DB version 9.2.0.6 (old I know) in a production environment. Linux OS.
    The query was made to extract data from a partitined table, on a partioned field, in our casa one Year. By mistake we have serced for the wrong year, 2013. There where no data for that year and therefor no partition.
    So, happened that the query hangs and after 24 hours was terminated.
    What we expected indeed was a zero records retirned in, at the most, few minutes, see that the table, in severa partition contains about 16 million records.
    The we tested the same query but in a different enviroment, Oracle 11gr2, same table structure, same partitioning, without partition 2013, and the query completed in less tha 1 minute with zero records in output.
    At this point we thought of a bug, but can't find any reference.
    Has anyone had a similar experience or can give some indication of possible bug report.
    Thanks for any help.

    Hi Rob,
    thank you for your answer.
    Sorry if this is not the best forum. I am not very practical.
    I try to answer to your questions.
    At a first time we thought the query did a full scan on the table. Yes. But even to full scan 16.000.000 records split in no more than 8 partition (at this time) shouldn't take up to 24 hours and never stop running. I think.
    We don't have a DBA role so we do not have full control over what is running. And take too long time to open a ticket and ask the DBA to check.
    What we did is testing the same query in a pre-prod environment, which is an Oracle 11gr2.
    I understand that it is not very usual to have a pre-production environment with a latest version of oracle but this is the way we have to work.
    Anyway, the test in pre-production worked very well. Without 2013 partition the return was very fast and we had zero records as expected.
    Then we found a workaround for production, ora 9. Call it work around maybe is too much ........
    We created the 2013 partition and run the query. The respons was then succesfull in about the same time than in pre-prod. Less than one minute and zero records.
    And this is fine for us.
    What we don't understand is why this different behavior with two different version of DB. Thats why we think it is due to a bug. We only want to find out whether it is this or if there is a different reason.
    Some other response or help would help.
    Thank you.

  • Select the same attribute in a query more than once

    Hi Experts,
    My requirement is to select the same attribute in a query more than once.
    How can I acheive this?
    Expecting an early solution..
    Pilliga

    Hi,
    Create a calculated attribute that just displays the "same attribute".
    (Note: you will need to uniquely name this object).
    For example, if you wish to display Emp Name twice in the same query, then create a calculated attribute called Emp Name2 and select it and Emp Name in your query and the same info will be displayed twice in your results set.
    Cheers,
    Tanish

  • VAL_FIELD selection to determine RSDRI or MDX query: performance tuning

    according to on of the HTG I am working on performance tuning. one of the tip is to try to query base members by using BAS(xxx) in the expension pane of BPC report.
    I did so and found an interesting issue in one of the COPA report.
    with income statement, when I choose one node gross_profit, saying BAS(GROSS_PROFIT), it generates RSDRI query as I can see in UJSTAT. when I choose its parent, BAS(DIRECT_INCOME), it generates MDX query!
    I checked DIRECT_INCOME has three members, GROSS_PROFIT, SGA, REV_OTHER. , none of them has any formulars.
    in stead of calling BAS(DIRECT_INCOME), I called BAS(GROSS_PROFIT),BAS(SGA),BAS(REV_OTHER), I got RSDRI query again.
    so in smmary,
    BAS(PARENT) =>MDX query.
    BAS(CHILD1)=>RSDRI query.
    BAS(CHILD2)=>RSDRI query.
    BAS(CHILD3)=>RSDRI query.
    BAS(CHILD1),BAS(CHILD2),BAS(CHILD3)=>RSDRI query
    I know VAL_FIELD is SAP reserved name for BPC dimensions.  my question is why BAS(PARENT) =>MDX query.?
    interestingly I can repeat this behavior in my system. my intention is to always get RSDRI query,
    George

    Ok - it turns out that Crystal Reports disregards BEx Query variables when put in the Default Values section of the filter selection. 
    I had mine there and even though CR prompted me for the variables AND the SQL statement it generated had an INCLUDE statement with hose variables I could see by my result set that it still returned everything in the cube as if there was no restriction on Plant for instance.
    I should have paid more attention to the Info message I got in the BEx Query Designed.  It specifically states that the "Variable located in Default Values will be ignored in the MDX Access".
    After moving the variables to the Characteristic Restrictions my report worked as expected.  The slow response time is still an issue but at least it's not compounded by trying to retrieve all records in the cube while I'm expecting less than 2k.
    Hope this helps someone else

  • Query hangs during Authorization Check (Event ID 4500)

    I have a BI7 query when executed by developer role (no security) the query runs within seconds.  When executing under end user id, it runs for 5 minutes +.   Aggregates are built and the long runtime ONLY occurs when it is an end user role with specific CC's. 
    I tested the query via RSRT, Cache off and Display Statistics and it is clear the query gets stuck for 4.5 minutes under Event ID 4500, Authorization Check.
    This delay does not occur when the query is initially executed.  It only occurs AFTER the variable prompt and when query variables are entered and query is executed.
    Q1)  Can anyone explain a transaction or place to understand why the Authorization Check takes so long? 
    Q2)  I would also like to understand the execution order for queries... for example how does the filters or data in the rows get executed?

    Hi Anurag
    i read again this documentation i'd get in another form ("howTo..." Guide on Help.sap.com) :
    I create newsample from scratch and it works !
    Reason of my problem :
    I created 2 authorization objects (given to users) :
    - first with IO 0CUSTOMER,value '*', without 0TCTAUTHH
    - second with IO OCUSTOMER, valeur ' ' (blank), with 0TCTAUTH with required node value.
    => First authorization grants * for 0CUSTOMER (all) and present the entire hierarchy during selection node in query. By deleting it, it works.
    Thank's a lot.
    Etienne

  • Query hangs on Value Help

    Hi,
    We have created a query in which we are using quantity conversion ( defined in RSUOM ) , the target quantity is to be taken from a variable. The quantity conversions is running fine but when we do a value help for the target quantity variable in Portal, the query hangs. We are not facing any such  issue in Bex Analyzer.
    Please share your ideas on what could be the possible reason for this.
    Thanks and Regards,
    Manish Sharma

    Hello Manish,
    This is clearly a Portal issue.
    Probably an issue with BI Java.
    I recommend you to update your BI Java components to latest patch recommended by Java SP_Patch Matrix.
    If you are using Netweaver 7.0, please check the link below:
    http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/6010addf-e096-2b10-8893-e98586d005f9 [original link is broken]
    If you are using Netweaver 7.0 EHP 1 (7.01), please the this link:
    http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/c098b21c-e56f-2d10-2aad-b13915b396a4 [original link is broken]
    Applying the patches recommended should solve the issue.
    Also, as a recommendation, run the BI Diagnostics - note 937697 - and correct the red alerts.
    Best Regards,
    Edward John

  • Ho do i check bcz of which query's the dead locks happend in 11g

    Hi,
    I am working on 11g database and recently dead locks happend and it's released it's fine. But i need to know becz of which query's the dead locks happend and who fired those query's.
    i hope we can get these info from trace file i opend trace file but am fully confusing how do i know all these details. Can any one help me on this...
    Thanks in advance
    Regards

    Check
    How to find where is deadlock?

Maybe you are looking for

  • How to distinguish NULL and Empty Strings

    Hi, Just to set the context right; I'm an experienced C programmer trying labview for the first time. As such I ran in to a problem being that Labview has no concept of NULL-pointers and more specifically appears to have no concept of the difference

  • How to create a clickable hyperlink in iCloud Numbers?

    How to create a clickable hyperlink in iCloud Numbers?

  • Adding HTML content in text frame

    I'm a little bit frustrated when adding some copy to edge. In order to add a simple hyperlink for example in my paragraph of text, I need to use the replace text field where I can add the <a href..> and change it over before it's viewed. Is there any

  • Use blog module or web apps for Blog posts?

    We are considering whether or not we should use a web app or continue to use the blog module for our client's blogs. Is anyone using web apps for their blogs, and if yes, what is your feedback on it? Or could someone tell me if BC will fix the blog p

  • How to use WLS 6.1 as a Web Server

    I would like to know how I can serve an HTML file using WebLogic 6.1. This is for testing purposes. I would like to do it outside of an application and just server the file. Thanks, -Jalil