Time issue of select statement

Hi friends,
   I have a doubt about select single statement in this particular statement below.
i have the code which goes this way.
loop at itab.
concatenate *year *materail no * item type into dummy variable.
select single dmbtr from bsis into itab-dmbtr where xref3 = dummy variable and belnr = itab-migodoc and gjahr = itab-mjahr and hkont = '0000123'.
clear dummy variable.
modify itab.
endloop.
the bsis table has around 4,000,000 records.
The report when executed goes smoothly till the point where the above select statement is encountered.
my question is does it take time to execute because of so many records ?
If not then why dies it take a lot of time to execute a single select statement ? 
and how can i optimise the time consumed by this select query or report. ?
Thank you.
Moderator message: please understand the basic concept of using primary or secondary indexes in your queries, you will sure find the missing field in your where-clause, read the sticky threads of this forum.
Edited by: Thomas Zloch on Nov 20, 2010 5:31 PM

Hi Vivek,
Data volume definitely gives impact on SQL.
Don't use sql inside the loop, it will decrease the performance.
Year material no. and item type may have duplicate entries. filter that. It may also gives impact on performance.
Write a single Select query.
Instead of fetching the data at once use packet size.
http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP4TuningChecklist
Regards,
Sudha
Edited by: Sudha Rani Pathuri on Nov 20, 2010 6:42 PM
Edited by: Sudha Rani Pathuri on Nov 20, 2010 6:48 PM
Edited by: Sudha Rani Pathuri on Nov 20, 2010 6:51 PM

Similar Messages

  • Performance Issue in Select Statement (For All Entries)

    Hello,
    I have a report where i have two select statement
    First Select Statement:
    Select A B C P Q R
         from T1 into Table it_t1
              where ....
    Internal Table it_t1 is populated with 359801 entries through this select statement.
    Second Select Statement:
    Select A B C X Y Z
         from T2 in it_t2 For All Entries in it_t1
              where A eq it_t1-A
                 and B eq it_t1-B
                 and C eq it_t1-C
    Now Table T2 contains more than 10 lac records and at the end of select statement it_t2 is populated with 844003 but it takes a lot of time (15 -20 min) to execute second select statement.
    Can this code be optimized?
    Also i have created respective indexes on table T1 and T2 for the fields in Where Condition.
    Regards,

    If you have completed all the steps mentioned by others, in the above thread, and still you are facing issues then,.....
    Use a Select within Select.
    First Select Statement:
    Select A B C P Q R package size 5000
         from T1 into Table it_t1
              where ....
    Second Select Statement:
    Select A B C X Y Z
         from T2 in it_t2 For All Entries in it_t1
              where A eq it_t1-A
                 and B eq it_t1-B
                 and C eq it_t1-C
    do processing........
    endselect
    This way, while using for all entries on T2, your it_t1, will have limited number of entries and thus the 2nd select will be faster.
    Thanks,
    Juwin

  • Performance Issue in select statements

    In the following statements, it is taking too much time for execution,Is there any best way to change these selection statements...int_report_data is my final internal table....
    select fsplant fvplant frplant fl1_sto pl1_delivery pl1_gr pl2_sto           pl2_delivery perr_msg into (dochdr-swerks,dochdr-vwerks,dochdr-rwerks,dochdr-l1sto,docitem-l1xblnr, docitem-l1gr,docitem-l2sto,  docitem-l2xblnr,docitem-err_msg) from zdochdr as f inner join zdocitem as p on fl1_sto  =  pl1_sto where fsplant in s_werks and
    fvplant in v_werks and frplant  in r_werks and pl1_delivery in l1_xblnr and pl1_gr in l1_gr and p~l2_delivery in l2_xblnr.
    move : dochdr-swerks    to  int_report_data-i_swerks,
            dochdr-vwerks    to  int_report_data-i_vwerks,
            dochdr-rwerks    to  int_report_data-i_rwerks,
            dochdr-l1sto     to  int_report_data-i_l1sto,
            docitem-l1xblnr  to  int_report_data-i_l1xblnr,
            docitem-l1gr     to  int_report_data-i_l1gr,
            docitem-l2sto    to  int_report_data-i_l2sto,
            docitem-l2xblnr  to  int_report_data-i_l2xblnr,
            docitem-err_msg  to  int_report_data-i_errmsg.
            append int_report_data.
        endselect.
    Goods receipt
    loop at int_report_data.
    select single ebeln from ekbe into l2gr where ebeln = int_report_data-i_l2sto and bwart = '101' and bewtp = 'E' and vgabe = '1'.
    if sy-subrc eq 0.
           move l2gr to int_report_data-i_l2gr.
           modify int_report_data.
       endif.
    endloop.
    first Billing document (I have to check fkart = ZRTY for second billing *document..how can i write the statement)
    select vbeln from vbfa into (tabvbfa-vbeln) where vbelv = int_report_data-i_l2xblnr or vbelv = int_report_data-i_l1xblnr.
    select single vbeln from vbrk into tabvbrk-vbeln where vbeln = tabvbfa-vbeln and fkart = 'IV'.
      if sy-subrc eq 0.
             move tabvbrk-vbeln to int_report_data-i_l2vbeln.
             modify int_report_data.
       endif.
       endselect.
    Thanks in advance,
    Yad

    Hi!
    Which of your selects is slow? Make a SQL-trace, check which select(s) is(are) slow.
    For EKBE and VBFA you are selecting first key field - in general that is fast. If your z-tables are the problem, maybe an index might help.
    Instead of looping and making a lot of select singles, one select 'for all entries' can help, too.
    Please analyze further and give feedback.
    Regards,
    Christian

  • Calling an SP takes over 200% more time over the select statement

    As part of my POC converting a SQL Server application over to SAP HANA, I'm find that CALL is taking over 200% more time than calling the SELECT statement directly. The result is that the application that uses ODBC against HANA with CALL statements is taking much more time than SQL Server. I'm finding this for all stored procedure calls in the application. Here is an example:
    CREATE PROCEDURE dbo.usp_GetOrdersByCustomerID
    (IN C_ID bigint)
    LANGUAGE SQLSCRIPT DEFAULT SCHEMA "DBO" READS SQL DATA
    AS BEGIN
    SELECT  TOP 20
       C_F_NAME,
                C_L_NAME,
                C_EMAIL,
                O_ID,
                O_TOTAL,
                O_DTS,
                O_FM_DTS
    FROM    dbo.Customer JOIN dbo.Orders ON C_ID = O_C_ID
    WHERE   C_ID = :C_ID
        ORDER   BY O_ID DESC;
    END;
    When using the following CALL statement in SAP HANA Studio
    CALL dbo.usp_GetOrdersByCustomerID(3429);
    I get execution times that look like this:
    Statement 'CALL dbo.usp_GetOrdersByCustomerID(3429)'
    successfully executed in 9 ms 663 µs  (server processing time: 8 ms 115 µs)
    Fetched 5 row(s) in 0 ms 69 µs (server processing time: 0 ms 0 µs)
    Statement 'CALL dbo.usp_GetOrdersByCustomerID(3429)'
    successfully executed in 11 ms 851 µs (server processing time: 8 ms 238 µs)
    Fetched 5 row(s) in 0 ms 62 µs (server processing time: 0 ms 0 µs)
    Statement 'CALL dbo.usp_GetOrdersByCustomerID(3429)'
    successfully executed in 8 ms 522 µs  (server processing time: 6 ms 892 µs)
    Fetched 5 row(s) in 0 ms 93 µs (server processing time: 0 ms 0 µs)
    When I execute the select statement with the hard coded parameter value, I get much faster results:
    Statement 'SELECT TOP 20 C_F_NAME, C_L_NAME, C_EMAIL, O_ID, O_TOTAL, O_DTS, O_FM_DTS FROM dbo.Customer JOIN ...'
    successfully executed in 4 ms 430 µs  (server processing time: 2 ms 424 µs)
    Fetched 5 row(s) in 0 ms 73 µs (server processing time: 0 ms 0 µs)
    Statement 'SELECT TOP 20 C_F_NAME, C_L_NAME, C_EMAIL, O_ID, O_TOTAL, O_DTS, O_FM_DTS FROM dbo.Customer JOIN ...'
    successfully executed in 4 ms 105 µs  (server processing time: 2 ms 210 µs)
    Fetched 5 row(s) in 0 ms 69 µs (server processing time: 0 ms 0 µs)
    Statement 'SELECT TOP 20 C_F_NAME, C_L_NAME, C_EMAIL, O_ID, O_TOTAL, O_DTS, O_FM_DTS FROM dbo.Customer JOIN ...'
    successfully executed in 4 ms 694 µs  (server processing time: 2 ms 810 µs)
    Fetched 5 row(s) in 0 ms 60 µs (server processing time: 0 ms 0 µs)
    I have 500,000 rows in the Customers table and 2,500,000 rows in the Orders table. The tables are COLUMN tables.
    Is there an optimization that I'm missing?
    Regards,
    Bill

    Hi Bill,
    Can you please try something:
    tab_cust =
    SELECT
       C_F_NAME,
                C_L_NAME,
                C_EMAIL
    FROM    dbo.Customer
    WHERE   C_ID = :C_ID;
    tab_orders =
    SELECT
                O_ID,
                O_TOTAL,
                O_DTS,
                O_FM_DTS
    FROM    dbo.Orders ON C_ID = O_C_ID
    WHERE   O_C_ID = :C_ID
    SELECT  TOP 20
       C_F_NAME,
                C_L_NAME,
                C_EMAIL,
                O_ID,
                O_TOTAL,
                O_DTS,
                O_FM_DTS
    FROM    :tab_cust JOIN :tab_orders ON C_ID = O_C_ID
        ORDER   BY O_ID DESC;
    END;
    Expected behavior: The data set for each of the tables is filtered out and then joined. Although the filter is expected to be pushed to each of the joined tables even in your case, but this is worth the try.
    Regards,
    Ravi

  • IF-ELSE issue in Select Statement

    Hello,
    I have following query in SQL Server which I am trying to convert to Oracle 11g.
    IF '[Param.1]' = 'S' OR '[Param.1]' = 'T' THEN
    select * from ULQUEUE
    END IF
    But when I write the same query in Oracle, it gives error stating Invalid SQL Statement. So how do I incorporate IF-ELSE in Select Statement in Oracle?
    Edited by: 967327 on Oct 31, 2012 2:01 PM

    Hi,
    First of all, remove asterisk sign from the end of line
    select * from ULQUEUE;* Second: where you try to put this code? This is not SQL, but PL\SQL so you have to have some variable where you want to put query result like this:
    declare
    x ULQUEUE%Rowtype;
    begin
    select *
    into    x
    from ULQUEUE
    end; This of course works when your query returns only one row. Otherwise process data in the loop or put result into array.

  • Is there any  way to Mask the Name when  a select statement is issued?

    Dear all,
    Is there any way to mask the name .. i mean if User issue a select statement in a customer table the real name should come like ' ABCXXXDEFXXCFXX'... Which is not the actual name?
    e.g if Name: CHIEV SONG MEE
    If user issue a statment select * from customers;
    The Result Should come something Like this:
    Name
    CHXXV SXNG MXX
    Thank You

    user3029023 wrote:
    but it seems there is no option in oracle it self which can be used as there they are saying to get a data masking software which we can't due to some internal issues....I would not say that. How one implements masking depends entirely on the requirements that need to be met.
    For example, schema A owns all the tables. Schema B can be created as a "trusted" schema - in other words, schema A trusts schema B and allows it full access (with grants) to its tables. Schema B implements data masking as views. For each table in A, a view exists in B that implements the required masking. B can now grant select access on these views to user C. User C will see the same data object names in B as it would have if it used A - only, by using the B data objects it uses masked data objects and not the original source data objects.
    Another example - schema Dev is to have all the data objects of schema Prod, but masked where needed. One can use CTAS (Create Table As Select) to create the required tables in Dev with masked values where relevant. This Dev schema can be "refreshed" on weekends by dropping all tables and getting a new fresh copy of production data and masking it - ready for the next week's development cycle.
    If the application use is for example APEX, then instead of coding SQL directly as reporting regions to display, a function is used instead. APEX supports reporting regions where it calls a function and this function provides the APEX run-time with the SQL to execute and contents to render. It is easy to use this approach to implement logic in functions that masked column data depending on who the APEX user is, the security/role attributes of the user, and so on.
    No there is not a single "+mask this column!+" feature in Oracle.. but that does not mean that such a feature is not supported and cannot be implemented. Oracle has a very comprehensive and rich set of tools - more so than most (if not all) other RDBMS products.
    It is up to the architect/designer/developer to use this toolkit in creating a system that meets the specific requirements at hand.

  • Having Problem in select statement.

    Dear gurus
    im having an issue in select statement.
    i have written a select statement which is fetching the result as i required but it takes to much time to execute.
    how to make it work fast.
    SELECT vbak~vkbur vbap~vbeln vbap~posnr vbak~audat
             vbap~kwmeng vbap~meins vbak~kunnr vbak~vkorg
             vbak~vtweg  vbak~spart matnr matkl auart
             vbap~abgru
      INTO CORRESPONDING FIELDS OF TABLE so_tab
      FROM vbak
      JOIN vbap ON vbak~vbeln = vbap~vbeln
      WHERE audat IN in_date
      AND matnr IN matnr
      AND ( auart = 'ZISO' OR auart = 'ZEXP' )
      AND vbap~werks IN werks  .
      SELECT lips~vbeln lips~posnr likp~lfdat lips~lfimg
             lips~meins likp~kunag matnr vgbel vgpos
             lfart
      INTO CORRESPONDING FIELDS OF TABLE del_tab
      FROM likp
      JOIN lips ON likp~vbeln = lips~vbeln
      FOR ALL entries IN so_tab
      WHERE vgbel = so_tab-vbeln
      AND vgpos = so_tab-posnr
      AND lfdat IN in_date
      AND likp~werks IN werks.
    Regards
    Saad Nisar.

    Hi,
    I agree with sabu.
    Along with these you need to do following things -
    SELECT vbak~vkbur vbap~vbeln vbap~posnr vbak~audat
             vbap~kwmeng vbap~meins vbak~kunnr vbak~vkorg
             vbak~vtweg  vbak~spart matnr matkl auart
             vbap~abgru
      INTO CORRESPONDING FIELDS OF TABLE so_tab
      FROM vbak
      JOIN vbap ON vbak~vbeln = vbap~vbeln
      WHERE audat IN in_date
      AND matnr IN matnr
      AND ( auart = 'ZISO' OR auart = 'ZEXP' )
      AND vbap~werks IN werks  .
    {color:green}
    *if sy-subrc eq 0.*
    *so_tab_tmp[]  = so_tab[].*
    *sort so_tab_tmp by vbeln posnr.*
    *delete adjacent duplicates from so_tab_tmp by vbeln posnr.*
    *if so_tab_tmp[] is not initial.*
    {color:green}
      SELECT lips~vbeln lips~posnr likp~lfdat lips~lfimg
             lips~meins likp~kunag matnr vgbel vgpos
             lfart
      INTO CORRESPONDING FIELDS OF TABLE del_tab
      FROM likp
      JOIN lips ON likp~vbeln = lips~vbeln
      FOR ALL entries IN so_tab_tmp
      WHERE vgbel = so_tab_tmp-vbeln
      AND vgpos = so_tab_tmp-posnr
      AND lfdat IN in_date
      AND likp~werks IN werks.
    {color:green}
    *endif.*
    *endif.*
    {color:green}

  • Select Statement Hangs often

    Hello ,
    I have very strange issue, Any select statement on few tables takes very long time( in fact it hangs) often but the same SQL runs in a second all other times in the same database. Please note that it is a simple select statement without any 'for update' clause.
    After recycling the database, the select statement runs faster but this situation comes back after couple of days on the same set of tables.
    We are using 9i release 2.
    Can you please advise how to go about solving this type of issue.
    Thanks.

    438628, Robert is correct in that the board would need to see an explain plan to have any chance of narrowing the problem down. If bind variable peeking is involved the plan may not match what Oracle is actually doing to solve the query.
    When the problem occurs try looking in v$plan_table and see if the plan matches the explain plan output. A difference would be a clue that a reparse of sometype is being done so the plan could be different for each execution. The presence of child cursors would also point to something causing reparses.
    Do any of the columns for this table involved in the where clause has histograms on them? What is the value of the spfile/init.ora parameter cursor_sharing?
    If cursor_sharing is EXACT then bind variable peeking should not be the problem. If the parameter is SIMILAR or FORCE then it could be. On 9.2 I believe there is a bug that causes a reparse for every execution when SIMILAR is used so evey execution could be a different plan.
    To check for skewed data just count the values in the column and then count by value. If the max(value_count) / count(*) is greater than a small percentage of the data then the column is skewed. The worse the skew the more likely that a plan chosen for a distinctive value is not a good plan for a non-distinctive value.
    HTH -- Mark D Powell --

  • Query regarding Oracle SQL select statement

    Hi,
    How does Oracle ensures a consistent snapshot with the select statement
    without locking the table. My question is summarized with an example below:
    1. At time T1, Oracle select statement is fired and is fetching the result.
    2. At time T2, some DML operation is performed on the same table on which
    the select was executed and a commit was fired.
    3. At time T3, The Oracle select statement (Step 1) completes.
    My question is whether the records of transaction at time T2 will be visible at time T3 or not?
    If "not", then does it mean that Oracle retrieves the rows from the time of last commit.
    I would also like to know if for the above mechanism, Oracle would make use of the rollback segemt to access the rows at a particular instant of time.
    TIA
    Regards,
    Raj

    This is called Read Consistency in the oracle. Its all about SCN before starting the transaction.
    Lets say
    1. T1 executs SELECT statement on EMP table.
    2. T2 made an update on the EMP and commited.
    But, T1 only still sees only old image of the data not the new one. This is called read consistency.
    You will be having two images in the buffer, one is consistent and changed image.
    When the T1 give SELECT statement it notes the SCN of the transaction. Read oracle document about read consistency.
    SJH.

  • SELECT statement for VBKD - FAE in FPLT

    HI,
    For CS Report - Need to find the Conform Business (AMC is there But Invoice is Pending ).
    For This -->
    I need to take the table flow as - FPLT --> VBKD --> All (like VBAK, VBAP etc..)
    Problem is -->
    SELECT statement
    INTO IT_VBKD
    FOR ALL ENTRIES IN IT_FPLT
    WHERE fplnr = gwa_fplt-fplnr
    is taking too much time to execute.
    1. All Entries are Pending for Invoice ( FPLT- FKSAF = 'A' )
    2. No entry in VBFA table for this criteria.

    Thanks Vinod,
    Yes, I check it.
    But, In Client's system VBAK-rplnr is always Initial.
    Actually, I have data like -->
    AMC for duration - 01.07.2010 to 30.06.2011
    For which I am taking Four Billing Cycles -
    1. 01.07.2010 to 30.09.2010 - billed on 01.09.2010
    2. 01.10.2010 to 31.12.2010 - billed on 01.12.2010
    3. 01.01.2011 to 31.03.2011 - Unbilled - Projected billing date 01.03.2011       "
    4. 01.04.2011 to 30.06.2011 - Unbilled - Projected billing date 01.06.2011       "
    I have to consider Case 3 & 4 (unbilled). How can I calculate details for it?
    Report is working Fine - if I select - Selection options from FPLT - But while taking it from Sales Order - It's going to TIME OUT at SELECT statement itself.
    (Because table FPLT has more than 10Lac entries - and all are fetched )
    Edited by: Priya.ABAP on Dec 6, 2010 11:47 AM

  • Performance issue on Select ...like

    Hi all,
    we have Oracle 9206, and when starting the following SQL statement, we have a important runtime, and we have a index on those fields, but when we use LIKE, we have a full table scan. My question is about the second SQL statement BETWEEN (or >= <= operators) if we can use it instead of LIKE, please advise. I've already export/import the table and the statistics are OK, and I've setup the Histogram on involved fields on the select but with out success, the runtime for the SELECT using LIKE is about 30/40 seconds it's not normal and the table include more than 1 million of entries.
    1. Select Partner from tab1 where field1 like 'VAN%' and field2 like 'K%';
    2. Select Partner from tab1 where field1 >= 'VAN' and field2 >='K';
    Regards,
    Aziz K.

    Why not test yourself ?
    SQL> create table p_tbl (partner varchar2(10), field1 varchar2(10), field2 varchar2(10));
    Table created.
    SQL>
    SQL> begin
      2  for i in 1..1000000 loop
      3      insert into p_tbl values (trunc(i/100),dbms_random.string('U',10),dbms_random.string('U',10));
      4  end loop;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> create index idx_p_tbl on p_tbl (field1,field2);
    Index created.
    SQL>
    SQL> exec dbms_stats.gather_table_stats(user,'P_TBL', cascade=>true)
    PL/SQL procedure successfully completed.
    SQL>
    SQL> set timi on
    SQL> select partner, field1, field2
      2  from p_tbl
    3 where field1 like 'VAN%'
    4 and field2 like 'K%';
    PARTNER    FIELD1     FIELD2
    7453       VANMKBIEZC KYDQHLZQHM
    1694       VANNBPJNQQ KTVUNNUGUR
    3408       VANQNSYBQP KSSYLCQKZE
    4324       VANSUKOECK KAJAYLSMLG
    Elapsed: 00:00:00.04
    SQL>
    SQL> select partner, field1, field2
      2  from p_tbl
    3 where field1 between 'VAN' and 'VANZZZZZZZ'
    4 and field2 between 'K' and 'KZZZZZZZZZ';
    PARTNER    FIELD1     FIELD2
    7453       VANMKBIEZC KYDQHLZQHM
    1694       VANNBPJNQQ KTVUNNUGUR
    3408       VANQNSYBQP KSSYLCQKZE
    4324       VANSUKOECK KAJAYLSMLG
    Elapsed: 00:00:00.03
    SQL> set timi off
    SQL> explain plan for select partner, field1, field2
      2  from p_tbl
      3  where field1 like 'VAN%'
      4  and field2 like 'K%';
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 500196574
    | Id  | Operation                   | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT            |           |     1 |    26 |     4   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| P_TBL     |     1 |    26 |     4   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | IDX_P_TBL |     1 |       |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       2 - access("FIELD1" LIKE 'VAN%' AND "FIELD2" LIKE 'K%')
           filter("FIELD1" LIKE 'VAN%' AND "FIELD2" LIKE 'K%')
    15 rows selected.
    SQL> explain plan for select partner, field1, field2  
      2  from p_tbl
      3  where field1 between 'VAN' and 'VANZZZZZZZ' 
      4  and field2 between 'K' and 'KZZZZZZZZZ';
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 500196574
    | Id  | Operation                   | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT            |           |     1 |    26 |     4   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| P_TBL     |     1 |    26 |     4   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | IDX_P_TBL |     1 |       |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       2 - access("FIELD1">='VAN' AND "FIELD2">='K' AND "FIELD1"<='VANZZZZZZZ' AND
                  "FIELD2"<='KZZZZZZZZZ')
           filter("FIELD2"<='KZZZZZZZZZ' AND "FIELD2">='K')
    16 rows selected.Conclusion ? LIKE or BETWEEN seems to be same in my case.
    Nicolas.

  • Selected state issue with Menu Module V2

    OK so I am getting an issue with Menu Module V2. I have used this before with success but this time I have hit a wall. I possed this question to BC live chat and they bugged out real quick.
    The site in construction is http://www.urbanista.com.au
    What is happening is that in the top right tools nav with the headings Home, Services, People, Contact Us using Menu Module V2. The Heading Services has a drop down and this is where the issue resides. Roll over any of these nav devices and you will see they will highlight orange. Home is already auto activating its Selcted state. Click on Contact Us and it will do the same.  Roll over and click on Services and it appears to have worked. While in Services roll over the drop down again and you will see all links have activated the Selected state. This is the issue. If you view the code of the Services UL you will see only the Services state has been alocated the Slected state. See below:
    <li id="Services" class="selected">
    <a href="/services.htm">Services</a>
    <ul>
    <li id="tools-panningdev">
    <li id="tools-housing">
    <li id="tools-urban-renewal">
    <li id="tools-project-management">
    <li id="tools-feasibility-tools">
    <li id="tools-governance-systems">
    <li id="tools-communications">
    <li id="tools-projects">
    </ul>
    </li>
    The CSS that runs the nav is as follows:
    ul.dropdown {
        font-weight: normal;
        font-family: Arial, Helvetica, sans-serif;
        font-style: normal;
        text-decoration: none;
        ul.dropdown li {
        background-color: transparent;
        color: #999;
        padding-top: 5px;
        padding-right: 10px;
        padding-bottom: 5px;
        padding-left: 10px;
        font-size: 12px;
        ul.dropdown li.hover,
        ul.dropdown li:hover {
        background-color: transparent;
        color: #FFF;
        ul.dropdown a:link,
        ul.dropdown a:visited    {
        color: #FFF;
        text-decoration: none;
        ul.dropdown a:hover        { color: #ff871f; }
        ul.dropdown a:active    {
        color: #b33b00;
        /* -- level mark -- */
        ul.dropdown ul {
        width: 150px;
        margin-top: 1px;
        background-image: url(/images/nav-transparency.png);
        background-repeat: repeat;
        color: #FFF;
        ul.dropdown ul li {
        font-weight: normal;
    ul.dropdown li.selected a {
        color: #ff871f;
    The last entry 'ul.dropdown li.selected a {color: #ff871f;}' is required in order to allocate a Slected State. Without it not Selected state is active and the links al remian white.
    I have tried all manner of combinations and additonal tags with no success. Any suggestions greatly appreciated. I have not modified the default Javascript provided by BC in the system apart from allocating the required ulTagClass as specified. The Javascript in the supplied 'container.html' is as follows:
    <script type="text/javascript" >
        // ids need to be unique per page, use different ones if you are including multiple menus in the same page
        // id of the nav tag, used above
        var divTagId = "myMenu1";
        // desired id for 1st <ul> tag
        var ulTagId = "myMenu1List";
        // desired class for 1st <ul> tag
        var ulTagClass = "dropdown dropdown-vertical";
        if ((null !== ulTagId) && ("" !== ulTagId)) {
            document.getElementById(divTagId).getElementsByTagName("ul")[0].setAttribute("id",ulTagId );
        if ((null !== ulTagClass) && ("" !== ulTagClass)) {
            document.getElementById(divTagId).getElementsByTagName("ul")[0].className = ulTagClass;
        // this will set the selected state
        if ((null !== ulTagId) && ("" !== ulTagId)) {
            catSetSelectedCSSItem(ulTagId);
    </script>
    Lastly this is one of the recomended navs by BC at the following address: http://lwis.net/free-css-drop-down-menu/
    I have used these before with success but for the life of me this has stumped me big time.

    Hi Matthew,
    Having a super quick look at the code I'd say it's because of:
    ul.dropdown li.selected a {
        color: #ff871f;
    This affects all the child elements.
    To override this down the line you could do something like:
    ul.dropdown li.selected ul li a {
        color: #fff;
    This would override the parent link color when selected.
    You could probably then also add:
    ul.dropdown li.selected ul li.selected a {
        color: #ff871f;
    For the dropdown selected states.
    That's a quick look though so don't quote me too much

  • Stop auditing select statements issued against SYS objects

    Hi,
    My current client has a requirement to track destructive updates (i.e. insert, update, delete) issued by users who can connect directly to the database. At the moment though, SELECT statements issued against SYS-owned objects are also being captured to the Oracle audit trail. For the time being at least these need to be disabled.
    I've issued NOAUDIT SELECT TABLE/SEQUENCE and NOAUDIT SELECT ANY TABLE/SEQUENCE commands, as has a user with the SYSDBA privilege, and they're still being logged. Is there any way to switch these off? I don't know if it's significant (I'm not a DBA by trade) but the audit_sys_operations parameter is set to True.
    My client is currently running Oracle Database 10.2.0.5.0 standard edition.
    If anyone has any suggestions I'd be grateful.
    Thanks in advance,
    Steve

    Hi,
    Thanks for the input so far ...
    @Eduardo and KarK ...
    show parameter audit
    audit_file_dest string D:\ORACLE\PRODUCT\10.2.0\ADMIN\USSUPM2\ADUMP
    audit_sys_operations boolean TRUE
    audit_trail string DB, EXTENDED
    If we set audit_sys_operations to FALSE, won't that stop auditing of all actions carried out by, for example, someone who connects as SYSDBA? That is something that's still needed to be captured. Unfortunately they go to the WIndows Event Log but at least they're captured somewhere.
    @Hemant
    This auditing was in place before my client took me on, so I can't say what was used to initiate it unfortunately. What I can say though is that they absolutely don't want to turn off auditing by SYS- type users, just SELECT against SYS-owned objects.
    Thinking simplistically, could I just write a script which trawls dba_objects for sys-owned tables, views and sequences and explicitly issues a noaudit select against what's found, and get one of the sysdba-type people we have access to to run it?
    Thanks in advance (again)
    Steve

  • Select statement is taking lot of time for the first time Execution.?

    Hi Experts,
    I am facing the following issue. I am using one select statement to retrieve all the contracts from the table CACS_CTRTBU according to FOR ALL ENTRIES restriction.
    if p_lt_zcacs[] is not initial.
    SELECT
               appl ctrtbu_id version gpart
               busi_begin busi_end tech_begin tech_end
               flg_cancel_obj flg_cancel_vers int_title
             FROM cacs_ctrtbu INTO TABLE lt_cacs FOR ALL ENTRIES IN p_lt_zcacs
                                                    WHERE
                                                    appl EQ gv_appl
                                                    AND ctrtbu_id EQ p_lt_zcacs-ctrtbu_id
                                                    AND  ( flg_cancel_vers EQ '' OR version EQ '000000' )
                                                    AND flg_cancel_obj EQ ''
                                                    AND busi_begin LE p_busbegin
                                                    AND busi_end GT p_busbegin.
    endif.
    The WHERE condition is in order with the available Index. The index has  APPL,CTRTBU_ID,FLG_CANCEL_VERS and FLG_CANCEL_OBJ.
    The technical settings of table CACS_CTRTBU says that the "Buffering is not allowed"
    Now the problem is , for the first time execution of this select statement, with 1.5 lakh entries in P_LT_ZCACS table, the select statement takes 3 minutes.
    If I execute this select statement again, in another run with Exactly the same parameter values and number of entries in P_LT_ZCACS ( i.e 1.5 lakh entries), it gets executed in 3-4 seconds.
    What can be the issue in this case? Why first execution takes longer time?.. Or is there any way to modify the Select statemnt to get better performance.
    Thanks in advance
    Sreejith A P

    Hi,
    >
    sree jith wrote:
    > What can be the issue in this case? Why first execution takes longer time?..
    > Sreejith A P
    Sounds like caching or buffering in some layer down the i/o stack. Your first execution
    seems to do the "physical I/O" where your following executions can use the caches / buffers
    that are filled by your first exectution.
    >
    sree jith wrote:
    > Or is there any way to modify the Select statemnt to get better performance.
    > Sreejith A P
    If modifying your SELECTS statement or your indexes could help depends on your access details:
    does your internal table P_LT_ZCACS  contain duplicates?
    how do your indexes look like?
    how does your execution plan look like?
    what are your execution figures in ST05 - Statement Summary?
    (nr. of executions, records in total, total time, time per execuiton,  records per execution, time per record,...)
    Kind regards,
    Hermann

  • SELECT statement takes long time

    Hi All,
    In the following code, if the T_QMIH-EQUNR contains blank or space values ,SELECT statement takes longer time to acess the data from OBJK table. If it T_QMIH-EQUNR contains values other than blank, performance is good and it fetches data very fast.
    Already we have indexes for EQUNR in OBJK table.
    Only for blank entries , it takes much time.Can anybody tell why it behaves for balnk entries?
    if not T_QMIH[] IS INITIAL.
            SORT T_QMIH BY EQUNR.
            REFRESH T_OBJK.
            SELECT EQUNR OBKNR
              FROM OBJK INTO TABLE T_OBJK
              FOR ALL ENTRIES IN T_QMIH
              WHERE OBJK~TASER = 'SER01' AND
             OBJK~EQUNR = T_QMIH-EQUNR.
    Thanks
    Ajay

    Hi
    You can use the field QMIH-QMNUM with OBJK-IHNUM
    in QMIH table, EQUNR is not primary key, it will have multiple entries
    so to improve the performance use one dummy internal table for QMIH  and sort it on EQUNR
    delete adjacent duplicates from d_qmih and use the same in for all entries
    this will improve the performance.
    Also use the fields in sequence of the index and primary keys also in select
    if not T_QMIH[] IS INITIAL.
    SORT T_QMIH BY EQUNR.
    REFRESH T_OBJK.
    SELECT EQUNR OBKNR
    FROM OBJK INTO TABLE T_OBJK
    FOR ALL ENTRIES IN T_QMIH
    WHERE  IHNUM =  T_QMIH-QMNUM
    OBJK~TASER = 'SER01' AND
    OBJK~EQUNR = T_QMIH-EQUNR.
    try this and let me know
    regards
    Shiva

Maybe you are looking for