Regarding index and anla table

Hi
i have code as below and i have Select option input
for fields bukrs, anln1 and anln2.
SELECT bukrs      anln1     anln2     anlkl txt50 ktogr invnrz sernr deakt               
    FROM anla                    
    INTO TABLE o_anla                    
   WHERE bukrs IN wa_ex_bukrs.
   if sy-subrc = 0.
   DELETE o_anla WHERE anln2 NOT IN wa_ex_anln2.
   DELETE o_anla WHERE anln1 NOT IN wa_ex_anln1.
   endif.
Does the below code change is more faster than above code.?
SELECT bukrs anln1 anln2 anlkl txt50 ktogr invnrz sernr deakt               
    FROM anla                    
    INTO TABLE o_anla                    
   WHERE bukrs IN wa_ex_bukrs
   and anln1 in wa_ex_anln1
   and anln2 in wa_ex_anln2.
I feel bukrs and anln1 and anln2 are primary key fields and could increase performance better.
However there is no std index available for this 3 fields. do you think creating secondary index
for this 3 field can increase performance.
Pls confirm.
Regards

Hi,
If bukrs, anln1 and anln2 makes the primary key then you are hitting the table with primary index itself(which is always a better option for good performance). Your 2nd query would always do better.  No need to create secondary index in this case.
Regards,
Ravi

Similar Messages

  • Regarding ska1 and skb1 tables

    Hi ,
             I got the requirement to extract the data from ska1 and skb1 tables, is their any standard datasource maintaining for that or else shall i extract based on generic extraction on view. Is the table which i mentioned is correct or not
    This was the requirement which am having
    The data which am having in excel is maintained in Budget in the year and budget in the month and previous. And parallel in the same data am having Actuals for the month and Actuals for the previous month.

    Hi,
    These tables are master data for G/L accounts; there are no figures stored in these tables.
    Regards,
    Eli

  • Regarding Indexes and performance tuning.

    Hi Everyone,
    I need some elaborate explanation about indexes and performance tuning.
    1. How do you find out whether the select query which I write is utilizing the indexes .
    2. Is it true that the sequence in which the indexes are defined in se11
      for eg:  MANDT
                 KNUMH
                 KOPOS
    your select query should also have the same sequence in the where clause else the indexes are not utilized well .
    3. Is there any precautions/ special method to write select queries for proper utilization of indexes.
    Thanks to all reading and answering in advance.
    Rgds,
    Anu.

    Hi
    You will find like this
    If your select like this
    select matnr mtart from mara into<itab>
    where matnr = <>..
    Go to table and see mara ..if matnr is checked as primary key,then you are using primary index.
    Check secondary index tab and see if any fields,if those fields you are using in select then you are using secondary index.
    2.Not sequence,check how many fields are checked tick as primary key,all thsoe are index.
    3.Always try to use proper primary index in select statment and avoid nested select statements.
    Thanks

  • Question regarding Classic and Advance table

    Hi,
    I have classic and advance table. I am populating with VO that brings 100 record. When i render page i see last record being displayed. How can i show my first record by defult on both tables?

    By default the first record will be displayed, if you are seeing the last one instead, you probably did a vo.last() in the code.
    Thanks
    Tapash

  • Three questions regarding DB_KEEP_CACHE_SIZE and caching tables.

    Folks,
    In my Oracle 10g db, which I got in legacy. It has the init.ora parameter DB_KEEP_CACHE_SIZE parameter configured to 4GB in size.
    Also there are bunch of tables that were created with CACHE turned on for them.
    By querying dba_tables table , with CACHE='Y', I can see the name of these tables.
    With time, some of these tables have grown in size (no. of rows) and also some of these tables are not required to be cached any longer.
    So here is my first question
    1) Is there a query I can run , to find out , what tables are currently in the DB_KEEP_CACHE_SIZE.
    2) Also how can I find out if my DB_KEEP_CACHE_SIZE is adqueataly sized or needs to be increased in size,as some of these
    tables have grown in size.
    Third question
    I know for fact, that there are 2 tables that do not need to be cached any longer.
    So how do I make sure they do not occupy space in the DB_KEEP_CACHE_POOL.
    I tried, alter table <table_name> nocache; statement
    Now the cache column value for these in dba_tables is 'N', but if I query the dba_segments tables, the BUFFER_POOL column for them still has value of 'KEEP'.
    After altering these tables to nocache, I did bounce my database.
    Again, So how do I make sure these tables which are not required to be cached any longer, do not occupy space in the DB_KEEP_CACHE_SIZE.
    Would very much appreciate your help.
    Regards
    Ashish

    Hello,
    1) Is there a query I can run , to find out , what tables are currently in the DB_KEEP_CACHE_SIZE:You may try this query:
    select owner, segment_name, segment_type, buffer_pool
    from dba_segments
    where buffer_pool = 'KEEP'
    order by owner, segment_name;
    2) Also how can I find out if my DB_KEEP_CACHE_SIZE is adqueataly sized or needs to be increased in size,as some of these tables have grown in size.You may try to get the total size of the Segments using the KEEP BUFFER:
    select sum(bytes)/(1024*10124) "Mo"
    from dba_segments
    where buffer_pool = 'KEEP';To be sure that all the blocks of these segments (Table / Index) won't be often aged out from the KEEP BUFFER, the total size given by the above query should be less than the size of your KEEP BUFFER.
    I know for fact, that there are 2 tables that do not need to be cached any longer.
    So how do I make sure they do not occupy space in the DB_KEEP_CACHE_POOL.You just have to execute the following statement:
    ALTER TABLE <owner>.<table> STORAGE(BUFFER_POOL DEFAULT);Hope this help.
    Best regards,
    Jean-Valentin

  • Query regarding passivation and PS_TXN tables

    Hi All ,
    I am working on a read only Dashboard UI where the DB user has only read privileges.
    The jbo.server.internal_connection uses the same DB connection to create PS_TXN & PS_TXN_SEQ tables which fails for obvious reasons & I get the error -
    "Couldnot create persistence table PS_TXN_seq".
    I have disabled passivation at all the VO levels and also disabled jbo.isSupportsPassivation to be false at the AMLocal level , but still I am getting this error.
    I have also increased the initial AM pool size in bc4j.xcfg & Connection Pool at the weblogic server level to avoid snapshots been written to this table.
    Is there any way I can prevent any interaction with this table as the client too is not interested in any kind of passivation to happen for the time being.
    Thanks

    Thanks for your reply Chris.
    Chris Muir wrote:
    You might be taking the wrong approach to solving this. Rather than disabling the AM pooling (which btw is not supported by Oracle) to the database, instead you can get ADF to passivate to file or memory of the app server.I am confused as to what exactly jbo.ampool.issupportspassivation = false does then ? I read on one of the blogs that its a viable use case for Programatic VOs ?
    Also regarding passivating to file system as per http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#ADFFD1307 , its not really a recommended approach.. hence was not going for that.
    Can you please throw some more light ?
    Thanks

  • Regarding ODS and Physical Tables

    Hi,
    can you tell me the difference between ODS and a physical table created using transaction SE11?
    I am writing a program to update this table not by any update rules, it is just updating the table using modify statement.
    suggest me which one to use a physical table or ODS?
    Thanks,
    Vijaya

    Hi Vijaya,
    You want to insert the records into the table/ODS using some ABAP...(not through update rules)..
    In such a case you can do it either way...but going for an ODS will give an added advantage. You will be able to report on the data in ODS.
    Hope it helps..
    Regards,
    Amol )

  • Regarding BP  and Premise tables

    Hi,
    what are the tables that will be updated when we create Business partner and Premise.
    Please Reply
    Regards,

    BP details should be there in BUT000 table.
    Address Number should be there at BUT020
    address details will be there at ADRC
    telephone details will be there at ADR6
    Please press BUT* in se11 u wiill get the exact description also.
    premise :  EVBS,EVBST.....
    Please Allot points
    Regards,
    Shiv.

  • Improve Performance of Dimension and Fact table

    Hi All,
    Can any one explain me the steps how to improve performance of Dimension and Fact table.
    Thanks in advace....
    redd

    Hi!
    There is much to be said about performance in general, but I will try to answer your specific question regarding fact and dimension tables.
    First of all try to compress as many requests as possible in the fact table and do that regularily.
    Partition your compressed fact table physically based on for example 0CALMONTH. In the infocube maintenance, in the Extras menu, choose partitioning.
    Partition your cube logically into several smaller cubes based on for example 0CALYEAR. Combine the cubes with a multiprovider.
    Use constants on infocube level (Extras->Structure Specific Infoobject properties) and/or restrictions on specific cubes in your multiprovider queries if needed.
    Create aggregates of subsets of your characteristics based on your query design. Use the debug option in RSRT to investigate which objects you need to include.
    To investigate the size of the dimension tables, first use the test in transaction RSRV (Database Information about InfoProvider Tables). It will tell you the relative sizes of your dimensions in comparison to your fact table. Then go to transaction DB02 and conduct a detailed analysis on the large dimension tables. You can choose "table columns" in the detailed analysis screen to see the number of distinct values in each column (characteristic). You also need to understand the "business logic" behind these objects. The ones that have low cardinality, that is relate to each other shoule be located together. With this information at hand you can understand which objects contribute the most to the size of the dimension and separate the dimension.
    Use line item dimension where applicable, but use the "high cardinality" option with extreme care.
    Generate database statistics regularily using process chains or (if you use Oracle) schedule BRCONNECT runs using transaction DB13.
    Good luck!
    Kind Regards
    Andreas

  • A query related to creating Indexes for a table

    Hi ,
    I am in a J2EE Banking Project using Oracle 10g as our Database .
    We have created Indexes on some tables .
    But this this is not called by any of our Java class .
    Could anybody please let me know how these Indexes will actually improve the Performance .
    Waiting for your replies .
    Thanks in advance .

    But in our safety database (huge & ofcourse Oracle), we use indexes just because to avoid duplicates, improve data retrieval and so on.As you pointed out indexes can do 2 things for you: enforce uniqueness and (hopefully) improve data retrieval. Enforcing uniqueness is pretty basic, but indexes don't always improve performance. Under the wrong condtions indexes can hurt performance. The ideas below refer to B-TREE indexes; other kinds of indexes have other considerations
    Indexes add overhead to insert, delete, and (hopefully not - updating index columns is a Bad Idea), enough so that if you're inserting a lot of rows into a large table it is sometimes helpful to drop the indexes, load the data, and recreate the indexes when done to help performance. The more indexes a table has the more overhead DML statements need to maintain them.
    Indexes help query performance under a couple of conditions. When using them as join keys to retrieve a small percentage of rows in a table (< 20% maybe; there is no firm number) indexes can help. When a query can read its columns from an index only (such as counts against a primary key index) index access can be faster than table access.
    Indexes can hurt performance by adding overhead for maintenance if the index is never actually used or if used to read most of the rows in a table when a full table scan would be more efficient (why go through the extra effort to read the index and then table when you'll have to read most of the rows in the table anyway?).

  • Regarding sy-index and sy-tabix

    Hi,
    What is the major difference between sy-index and sy-tabix ,
      can you give me one good example with code..
    Regards,
    Reddy.

    Hi,
    SY-TABIX - Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY_INDEX - In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    sy-tabix is the tab index - the index of the record in the internal table you are accessing,
    sy-index is the loop counter.
    If you use a condition in LOOP the sy-index will go from 1 to n, but sy-tabix will refer to the line in the internal table.
    Hope this helps u.
    Thanks,
    Ruthra

  • Can we create secondary indexes in pooled and cluster table?

    hello all
    can we create secondary indexes in pooled and cluster table?

    Hi,
    Yes, you can.
    Refer the below links
    [http://www.sap-img.com/abap/the-different-types-of-sap-tables.htm|http://www.sap-img.com/abap/the-different-types-of-sap-tables.htm]
    [http://help.sap.com/saphelp_40b/helpdata/en/cf/21f083446011d189700000e8322d00/content.htm|http://help.sap.com/saphelp_40b/helpdata/en/cf/21f083446011d189700000e8322d00/content.htm]
    Regards,
    SB

  • Duplicate records in database view for ANLA and ANLC tables

    HI all,
    Can any one please suggest me how to remove duplicate records from ANLA and ANLC tables when creating a database view.
    thanks in advance,
    ben.

    Hi,
    Suppose we have two tables one with one field and another with two fields:
    TAB1 - Key field KEY1
    TAB2 - Key fields KEY1 & Key 2.
    No if we create a Database view of these two tables we can do by joining these two tables on Key field KEY1.
    Now if in View tab we have inculded TAB1- Key1.
    Now lets suppose following four entries are in table TAB1: (AAA), (BBB), (CCC).
    and following entries are in table TAB2: (AAA, 1), (AAA, 2),  (BBB, 3), (BBB, 5), (DDD, 3).
    The data base view will show following entries:
    AAA,
    AAA,
    BBB,
    BBB,
    Now these entris are duplicate in the output.
    This is because TAB2 has multilple entries for same key value of TAB1.
    Now if we want to remove multiple entries from ouput - we need to include an entry in selection conditions like TAB2-KEY2 = '1'.
    Regards,
    Pranav.

  • Secondary index on aggregate table and cube

    Hi to all,
    I have small doubt.
    1. Primary index created in F and E table of CUBE by system.
      then how secondary index in created in F and E table of cube,
      or
    is that B* tree index created as secondary index on F/E table of cube, when we use process type create / deleted index in PC for CUBE
    or if we do manually under performance tab for cube.
    2. Primary index also created on F and E table of aggregate by system.
      then how secondary index in created in F and E table of aggregate,
      or
    is that B* tree index created as secondary index on F/E table of aggregate, when we use process type create / deleted index in PC for CUBE
    or if we do manually under performance tab for aggregate
    Regards
    Pavneet Rana

    Hi,
    Thru process chains you can't handle them.
    You can do it by manual with help basis or ABAP team.
    BW server--> T code  SE11, Select table - Enter table name and display it.
    On next screen on tool bar you can see indexes --> click on it.
    Thanks

  • Regarding Secondary Index in a Table

    hi
    if i create a secondary index in a table is it obligatory or optional to have first field as MANDT (Client field) if the table is client dependent & how many secondary indexes(MAXIMUM) can be created for a table.
    Regards

    Hi,
    Check the below Link
    How to transport a secondary index on P master data table?
    Hope this helps you.
    Regards,
    Anki Reddy

Maybe you are looking for

  • I have problem usb ports in my macbook

    I have a MAC BOOK  INTEL Core 2 duo .My usb ports not works. I tried reset PRAM, SMC reset. I removed the battery. And nothing work. Please Help

  • HP officejet Pro L7590 Prints 1/2 of the text line on several lines of document

    I got an email for diagnosing the printer and I was prompted to install updated drivers and I did that and now when I print the test page I get several lines of text that only prints the top or bottom 1/2 of the letters across the page, I Printed a s

  • Do I need to buy a new optical drive?

    Wouah, really strange things happening. A couple of weeks ago, I had to burn something like a hundred DVDs, but couldn't complete coz my drive (a Pionneer 111D) was refusing to burn 2 in every four DVD. Thought the problem was from the media itself.

  • 50L7300UC - sound input from Mac not outputting to ARC

    I'm having an odd problem with audio on my 50L7300UC (Canadian model of the 50L7300U). I have a soundbar hooked up via HDMI ARC, and it works fine for audio from my cable PVR, from online sevices such as Netflix accessed through the TV itself, and fr

  • Payment  Terms in account work center

    HI All, where can I found the Payment  Terms into the Account Work Center? Is it possible to add this information into the Account overview? Thank for any help. Simone