Primary index

Hi,
I have created one table(internal table) in se11 and also have assigned some fields are as primary keys.I know that when we define primary key for one field the system will create primary index for that as ' 0 '.now my question is how to see and use that key.
Regards,
Krishna.

Hi..
Primary Index is Created on the Primary key fields of the Table automatically when the Table is Activated.
Whenever we use the Select.. where clause on Primary key the Primary index is used by the system. We can't explicitly use indexes.
To Check whether a query is using index or not we can use SQL Trace ST05.
<b>reward if Helpful.</b>

Similar Messages

  • Difference between primary key and primary index

    Dear All,
             Hi... .Could you pls tell me the difference between primary key and primary index.
    Thanks...

    Hi,
    Primary Key : It is one which makes an entry of the field unique.No two distinct rows in a table can have the same value (or combination of values) in those columns.
    Eg: first entry is 111, if you again enter value 111 , it doesnot allow 111 again. similarly for the strings or characters or numc etc. Remember that for char or numc or string 'NAME' is not equal to 'name'.
    Primary Index: this is related to the performance .A database index is a data structure that improves the speed of operations in a table. Indices can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records. The disk space required to store the index is typically less than the storage of the table (since indices usually contain only the key-fields according to which the table is to be arranged, and excludes all the other details in the table), yielding the possibility to store indices into memory from tables that would not fit into it. In a relational database an index is a copy of part of a table. Some databases extend the power of indexing by allowing indices to be created on functions or expressions. For example, an index could be created on upper(last_name), which would only store the uppercase versions of the last_name field in the index.
    In a database , we may have a large number of records. At the time of retrieving data from the database based on a condition , it is a burden to the db server. so whenever we create a primary key , a primary index is automatically created by the system.
    If you want to maintain indices on other fields which are frequently used in where condition then you can create secondary indices.
    Reward points if helpful.
    Thanks,
    Sirisha..

  • Primary index does not exist in database but shows in SE14?

    I added a couple of key fields to a Z table and activated it. Every thing went well - adjusted it with SE14 also.
    When I checked the Runtime object - it is OK.
    When I checked Database Object, it is showing that the Primary Index does not exist in Database but SE14 says that the Priamry Index exists in Database.
    Please advise how to correct this. I saw another psoting when I searched per this error message: "Indexes: Inconsistent with DDIC source" . It tells to create this index at Database but need to know the steps.
    pl advise.
    (reposting here)
    Edited by: Venkatabby on Mar 26, 2008 4:05 PM

    hi,
    To create a index for a table,
    go to se11->click on Indexes tab and create  a primary index.
    Indexes speed up data selection from the database. They consist of selected fields of a table, of which a copy is then made in sorted order. If you specify the index fields correctly in a condition in the WHERE or HAVING clause, the system only searches part of the index (index range scan).
    The system automatically creates the primary index. It consists of the primary key fields of the database table. This means that for each combination of fields in the index, there is a maximum of one line in the table. This kind of index is also known as UNIQUE.
    If you cannot use the primary index to determine the result set because, for example, none of the primary index fields occur in the WHERE or HAVINGclauses, the system searches through the entire table (full table scan). For this case, you can create secondary indexes, which can restrict the number of table entries searched to form the result set.
    You create secondary indexes using the ABAP Dictionary. There you can create its columns and define it as UNIQUE.
    reward points if useful.
    regards
    sandhya

  • Creation of primary index

    Dear experts,
    A standard sap table does not have primary key index. I assume there was a problem with installation.
    Please let me know if there is a way to create the primary index? BDCP~0? Can I do it the same way as I would if I created another index?
    Thank you in advance,
    Roxani

    Hi,
    The primary key index will create the system. .
    The BDCP table contains the primary index "BDCP~0"
    We can view the primary index in the following way
    Tcode :  se11 --> table name (ex:BDCP) --> Display --> Utilities --> Database Object -->
      Database Utility (Click on) --> Extras --> Databse objects --> Display (click on)  here we can find the table fields and Primary index.
    If you want to create a Secondry indexes,
    Click on Indexes --> Click on Create --> Creare indexe --> give the index name -> hit the enter --> give the shart description and field name (on which field you want to create Secondary index) --> Save --> Check --> Activate.
    Thank you,
    Sekhar.

  • Missing primary index

    Hi All
    In db02 under diagnostics we can see the missing table and indexes. I just want to know the which backend program actually triggers or from which tables is referring to finds out the missing primary indexes in database and particulary shows which object has an inconsistency of it.
    Thanks
    Siva

    Hi All
    In db02 under diagnostics we can see the missing table and indexes. I just want to know the which backend program actually triggers or from which tables is referring to finds out the missing primary indexes in database and particulary shows which object has an inconsistency of it.
    Thanks
    Siva

  • Primary Index is not Active in Database

    Dear Experts,
       I have created a ztable and transported it to production server. But in Production server the primary index is missing. When i checked in it in development and quality server it exist there but not in production. I have tried to activate through SE14 but it is not activating . Can you please suggest a procedure to activate it. Waiting for your suggestion.
    Regards,
    Venkat.

    posted in abap dictionary

  • Data deletion on primary index and secondary index

    Hello, I have a question regarding data deletion in BDB-JE.
    Suppose I have an Entity class which has a primary index and a secondary index, the secondary key does not have outer related entity. So when I want to delete this entity, is it correct we only need to remove the entity from primary index? or I also need to do it for secondary index or just remove it from secondary index and internally BDB_JE will remove it from primary index?
    Thanks
    Anfernee

    You can delete an Entity using the delete method for primary index or the secondary index. When an entity is deleted, secondary index records are automatically deleted. The primary and secondary indices are always kept in sync.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Create a fast refresh materialized view with partitioned primary index

    Hi,
    I have a materialized view that is based on a table with primary key.
    I want to create a materialized view with a partitioned primary index . do you have any way of doing it?
    I tried to create a materialized view with rowid and then I created a partitioned primary index on it.
    It did not work as what I expected. I could not perform a fast refresh on it. the materialized view can only complete refresh
    thank you

    Hi,
    Here is some info from the Oracle Documentation.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10706/repmview.htm
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10810/basicmv.htm
    Determining the Fast Refresh Capabilities of a Materialized View
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10706/repmview.htm#BABEDIAH
    Regards,

  • Primary Index to create

    Hi Experts,
    In BW 3.5, in DB24 there's a missing_index warning for a transparent table /BIC/Fxxxx (xxxx is not the name of the infocube)
    In SE14, it says thaht this primary index /BIC/Fxxxx-0 must not be created on the database.
    First of all, what kind of table is this one ? /BIC/F : partitionned F-Fact table ?
    Second, should I create this index or not ?
    Regards,

    Hi again,
    Thanks for your answers.
    But so why brconnect sends a missing_index error, and only for this table ? There are other fact tables whitout primary index, and brconnect does not send any error.
    regards,

  • Primary indexes missing

    Hi friends,
    In transaction DB02 I am getting 7 primary indexes missing,please tell me how to correct this error.
    Regards,
    Vish.

    Hi Vish,
    There are several SAP notes on this depending on the kind of database you use. Have a look at them as well. It should give you idea.
    Regards.

  • Missing Primary Indexes

    Hi,
    I have observed that Primary Indexes are missing for Master data Infoobject 'P' table.
    any advise ?
    Ellora

    Dear Eric,
    Im curious to know the reason for such error ? Can u pls share with me ?
    What necessary actions to be taken in these scenarios ? Primary indexes to the extent of my knowledge cannot be created like the way we create Secondary indexes in BW.
    How to avoid this in Future ?
    Your inputs are valuable.
    Regards
    Ellora

  • Database object is inconsistent: (Primary index)

    Hi All ,
    I'm getting this "Database object is inconsistent: (Primary index)" when I run database consistency check on one of my z table and some how due to this problem program is able to insert duplicate entries in the table.
    Can some one help ?
    Regards ,
    Laeeq

    I'm getting this when I'm checking the consistency and I ran SE14 as well , I deleted the database table and created it again .. but the problem is still there ..
    Regards ,
    Laeeq.

  • Getting an error saying no primary index is used in where condition in SCI.

    Hi,
    I have develped a report using table PAYR.
    The selection -screen of this report consists of Runid, Identification and Payment date.
    The select qurey i used is
    SELECT chect
               zaldt
               rwbtr
               znme1
               voidd
          FROM payr INTO TABLE it_details
          WHERE laufd EQ p_laufd AND
                laufi EQ p_laufi AND
                zaldt EQ p_date.
    But when i check the code with code inspector im getting an error saying no primary index is used in where condition.
    How can i solve this problem.
    Pls. provide some pointers.
    Thanks.

    HI Deepti,
         The problem is since the fields used in where condition is not mentioned in any of the indexes created for table ( you can check the maintained indexes for table by clicking on the 'Indexes' button or ctrl+F5)
          Atlease include MANDT in where condition, or create your own index with the fields which you have used in SELECT query.
    this will solve the problem
    Regards
    Seema

  • Urgent - Pls help - Missing Primary Indexes

    Hi All,
    When i check in DB02 -in BW, its showing
    10 Primiary indexes are missing.
    I have tried to copy the table name to find our, where the indexes are actually missing . But, there is not table with that name.
    ( Earlier it was showing that, 26 secondary indexes are missing but, once we have fixed it, now its showing that 10 Primary indexes are missing )
    Thanks
    Nisha

    When you check in DB02, you will also find tables which are missing..probably you need to create these tables prior to creating the missing primary indexes.
    Regards
    Manga

  • Stop SAP BW to create primary index after transport

    Hi there,
    does anyone know how to stop SAP BW to create an index for transported cubes automatically?
    Thanks
    Oliver
    Edited by: Oliver Schropp on Aug 19, 2011 4:04 PM

    Hi,
    Primary Index is SAP provided.
    The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
    There is no way to automated deletion of it.
    Thanks,

Maybe you are looking for

  • Error while Issuing material against STO

    Dear All,              I made a STO.but while issuing the material Against STO,the error "                                                                the system has not found any order items in the purchase order " come.no release stragaey on STO

  • How do I change the default email-subject line when emailing from Acrobat 8...

    Hi, After creating a document in acrobat and clicking the email icon on the tool bar, Acrobat automatically opens and attaches the document to a new email message in Outlook. It also adds the file name as the subject, then appends "- Adobe Acrobat Pr

  • Oc4j version bundled with JDeveloper 9i rc

    Hello, is the oc4j version that is bundled with the just released JDeveloper 9irc the final one? "Oracle9iAS (2.0.0.0) Containers for J2EE" it looks a little different from the "technology preview" which can be downloaded seperatly from the otn site.

  • Replicating Vendor (plant) in Sales Order

    Hi We are replicating sales orders form ECC to CRM, however vendor is not replicating correctly to CRM. The error we can see after the order replication is: Enter Vendor. Any ideas how to replicate in a successfully way this business partner???? Than

  • Procedure / function highlighter

    I would loved to have this features in SQl developer.Or if it is already present can some one please highlight it 1)Does SQL developer highlight the proc /function name of the current line in a package ,EX: In a package called pck if there are 10 pro