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

Similar Messages

  • What is diff b/w sy-index and sy-tabix

    Hi all,
    Can u plz give me the diff b/w sy-index and sy-tabix exactly and how it works.
    Thanks & Regards
    Venkat

    Hi Venkat,
    <b>1.SY-INDEX</b>
    <b>-></b>Current loop pass
    <b>-></b>In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    <b>2.SY-TABIX</b>
    <b>-></b>Current line index
    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.
    <b>APPEND</b> 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.
    <b>
    COLLECT</b> 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.
    <b>LOOP AT</b> 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.
    <b>READ TABLE</b> 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.
    <b>
    SEARCH</b> <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
    I think that it clears ur doubt.
    <b>Thanks,
    Venkat.O</b>

  • What is difference between sy-index and sy-tabix and where both are using ?

    what is difference between sy-index and sy-tabix and where both are using ?

    hi nagaraju
    sy-tabix is in Internal table, current line index. So it can only be used while looping at the internal table.
    sy-index is in Loops, number of current pass. This you can use in other loop statements also (like do-enddo loop, while-endwhile)
    SY-INDEX is a counter for following loops: do...enddo, while..endwhile
    SY-TABIX is a counter for LOOP...ENDLOOP, READ TABLE...
    Here is an example from which you can understand the difference between sy-tabix and sy-index.
    Itab is an internal table with the following data in it.
    id Name
    198 XYZ
    475 ABC
    545 PQR.
    loop at itab where id > 300.
    write :/ itab-id, itab-name , sy-tabix, sy-index.
    endloop.
    My output will be :
    475 ABC 2 1
    545 PQR 3 2
    Sy-tabix is the index of the record in internal table.
    sy-index gives the no of times of loop passes.
    So, for the first record in the output (475 ABC), 2 is the index of the record in internal table and as it is first time loop pass occured, sy-index value is 1.
    Regards,
    navjot
    award points

  • Difference b/w sy-index and sy-tabix

    hai all,
    Could u explain the difference b/w sy-index and sy-tabix?
    regards,
    Selva

    Hi,
    sy-index - For Loops, Current Loop Pass.
    sy-tabix - For Internal Table, Current Line Index in internal table.
    sy-tabix is used at internal table operations (READ TABLE ... LOOP AT ...), sy-index is used at cycles (DO...n TIMES).
    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.
    it can be set by using the following:
    1.append
    2.collect
    3.loop at
    4. read
    5.search
    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 <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY-INDEX:
    SY-INDEX is used to describe the number of iteration with in the DO..ENDDO, WHILE ...ENDWHILE....
    for example,
    DO.
    WRITE SY-INDEX.
    IF SY-INDEX = 3.
    EXIT.
    ENDIF.
    ENDDO.
    it gives output as:
    1 2 3
    Regards,
    Raj.

  • Which to use - Sy-index or sy-tabix ??

    This is what i found out about SY-INDEX and SY-TABIX but which one to use when i want to delete a line of data from an internal table ? I tried both sy-index and sy-tabix and both works fine and returning the expected output for me but which one is better of to use ?
    SY-TABIX :- For Internal Table, Current Line Index
    SY-INDEX :- For Loops, Current Loop Pass
    The below code is where i uses the Delete ..
    LOOP AT dmg.
            CONCATENATE
                   dmg-dmg00
                   dmg-dmg01
                   dmg-dmg02
                   dmg-dmg03
                   dmg-dmg04
                   dmg-dmg07
                   dmg-dmg08
                   dmg-dmg09 INTO tli_down1 SEPARATED BY '*'.
            APPEND tli_down1. CLEAR tli_down1.
            DELETE dmg INDEX sy-index.
            EXIT.
          ENDLOOP.

    Right. Just like what they said upstairs, sy-babix is the best choice.
    One more thing is, if you want to concatenate fields of table dmg and append to tli_down1 on by one. You should not use EXIT after delete dmg.
    In that case ,only one line can be appended into tli_down1 table.
    > The below code is where i uses the Delete ..
    >
    > LOOP AT dmg.
    >         CONCATENATE
    >        dmg-dmg00
    >         dmg-dmg01
    >        dmg-dmg02
    >         dmg-dmg03
    >        dmg-dmg04
    >         dmg-dmg07
    >        dmg-dmg08
    >         dmg-dmg09 INTO tli_down1 SEPARATED BY '*'.
    >   APPEND tli_down1. CLEAR tli_down1.
    >       DELETE dmg INDEX sy-index.
    >   EXIT.
    >     ENDLOOP.

  • 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

  • Sy-index vs sy-tabix

    hi,
    i a bit confused of these 2. can let me know the difference?
    normally used in internal table?
    what keyword can use these 2? read, insert, delete,loop, append, modify.
    thanks

    hi,
    SY-INDEX
    The system field sy-index contains the number of loop passes, including the current loop pass.
    There are four kinds of loops in ABAP:
    · Unconditional loops using the DO statement.
    · Conditional loops using the WHILE statement.
    · Loops through internal tables and extract datasets using the LOOP statement.
    · Loops through datasets from database tables using the SELECT statement.
    SY-TABIX
    If the internal table is an index table, SY-TABIX is set to the index of the line retrieved.
    READ
    chk out this link http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
    APPEND sets SY-TABIX to the index of the last table row, that is the total number of entries in the target table.
    LOOP AT sets SY-TABIX to the index of the current table row at the beginning of every loop pass. After leaving a loop, SY-TABIX is set to the value it had before entering the loop. With hashed tables, SY-TABIX is set to 0.
    INSERT
    chk out this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb361f358411d1829f0000e829fbfe/content.htm
    DELETE
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb37d9358411d1829f0000e829fbfe/content.htm
    MODIFY
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm</u> 
    hope this ll help u.
    Regards,
    Viji

  • Regarding deleting index

    Hi Friends,
    If I delete the whole content of an Infocube and then do the reload,is it require to delete the index seperately.
    If I don't delete the index how is it going to impact the load?
    Regards,
    Debjani...

    It doesn't mean that Indexes will delete permanently .. Structure will remain same!
    When you delete data from cube it also deletes the generated indexes which are existed .. there is no point of having indexes on deleted records .. it's logical
    even it doesn't hold any data it allows you to create index and generate stats(ex. create a dummy cube and try to generate)
    For the moment I don't have any document for it..  I will let know
    For your 2nd ques.
    Only for huge loads droping index will be usefull which will improve the loading performance!
    For daily delta load with less volume of data you need not to drop Indexes .. if you do so it will take lot of time to rebuild the indexes(on whole data)

  • Regarding Condition Index

    Hi All,
    With regards to condition index I have made the required tick in the condition type now when I am going into the master data with regards to creating condition records selecting the condition index tab by giving the input as the condition type, the system says that there are no records found, eventhough I have created the sales order  in the system, the access sequence consists of line item and sales order please advise if any other configuration needs to be done for condition index and how do I check if the configuration is complete.
    Kind Regards
    Atul

    Hi Condition indes only Specifies whether the system updates one or more condition indices when maintaining condition records. It depends whether you had created the combination of condition recored to determin if you can find the existing one, please be sure you had created the condition record via vk11.

  • What is RID in non clustered index and its use

    Hi All,
    I need help regarding following articles on sql server
    1) what is RID in non clustered index and its use.
    2) What is Physical and virtual address space. Difference in 32 bit vs 64 bit Virtual address space
    Regards
    Rahul

    Next time Please ask single question in a thread you will get better response.
    1. RID is location of heap. When you create Non clustered index on heap and
    lookup happens to get extra records RID is used to locate the records. RID is basically Row ID. This is basic definition for you. Please read
    this Thread for more details
    2. I have not heard of Physical address space. I Know Virtual address space( VAS)
    VAS is simple terms is amount of memory( virtual )  'visible' to a process, a process can be SQL Server process or windows process. It theoretically depends on architecture of Operating System. 32 bit OS will have maximum range of 4 G VAS, it's calculated
    like a process ruining on 32 bit system can address max up to 2^32 locations ( which is equivalent to 4 G). Similarly for 64 bit max VAS will be 2^64 which is theoretically infinite. To make things feasible maximum VAS for 64 bit system is kept to 8 TB. Now
    VAS acts as layer of abstraction an intermediate .Instead of all request directly mapping to physical memory it first maps to VAS and then mapped to physical memory so that it can manage request for memory in more coordinated fashion than allowing process
    to do it ,if not it will  soon cause memory crunch.Any process when created on windows will see virtual memory according to its VAS limit.
    Please read
    This Article for detailed information
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • First Try with JE BDB - Indexes and Inheritance troubles... (FIXED)

    Hi Mark,
    Mark wrote:
    Hi, I'm a newbie here trying some stuff on JE BDB. And now I'm having
    I am happy to help you with this, but I'll have to ask you to re-post this question to the BDB JE forum, which is...
    Sorry for the mistake. I know now that here is the place to post my doubts.
    I'm really interested in JE BDB product. I think it is fantastic!
    Regarding my first post about "Indexes and Inheritance" on JE BDB, I found out the fix for that and actually, it wasn't about "Indexes and Inheritance" but "*Inheritance and Sequence*" because I have my "@Persistent public abstract class AbstractEntity" with a "@PrimaryKey(sequence = "ID_SEQ") private Long id" property.
    This class is extended by all my business classes (@Entity Employee and @Entity Department) so that my business classes have their PrimaryKey autoincremented by the sequence.
    But, all my business classes have the same Sequence Name: "ID_SEQ" then, when I start running my JE BDB at first time, I start saving 3 new Department objects and the sequence for these department objects star with "#1" and finishes with #3.
    Then I continue saving Employee objects (here was the problem) I thought that my next Sequence number could be #4 but actually it was #101 so when I tried to save my very first Employee, I set the property "managerId=null" since this employee is the Manager, then, when I tried to save my second Employee who is working under the first one (the manager employee), I got the following exception message:
    TryingJEBDBApp DatabaseExcaption: com.sleepycat.je.ForeignConstraintException: (JE 4.0.71) Secondary persist#EntityStoreName#com.dmp.gamblit.persistence.BDB.store.eployee.Employee#*managerId*
    foreign key not allowed: it is not present in the foreign database
    persist#EntityStoreName#com.dmp.gamblit.persistence.BDB.store.eployee.Employee
    The solution:
    I fixed it modifying the managerId value from "4" to "101" and it works now!
    At this moment I'm trying to understand the Sequence mechanism and refining concerns about Cursors manipulation...
    Have you any good material about these topics, perhaps a link where I can find more detailed information on these?
    Thanks in advance Mark, thanks for your attention on this and I will post more doubts in the future for sure ;0)
    Regards,
    Diego

    Hi Diego,
    I fixed it modifying the managerId value from "4" to "101" and it works now!I'm glad you found the problem. It is usually best to get the assigned ID from the entity object after you call put(), and then use that value to fill in related fields in other entities. The primary key field (assigned from the sequence) is set by the put() method.
    At this moment I'm trying to understand the Sequence mechanism and refining concerns about Cursors manipulation...Have you any good material about these topics, perhaps a link where I can find more detailed information on these? >
    To find documentation, start at the first message in the forum, the Welcome message:
    http://forums.oracle.com/forums/ann.jspa?annID=250
    This refers to the main JE doc page, the JE FAQ and a white paper on DPL queries. The FAQ has a section on the DPL, which refers to the javadoc. The DPL javadoc has lots of info on using cursors along with indexes (see EntityIndex, PrimaryIndex, SecondaryIndex). The white paper will be useful to you if you're accustomed to using SQL.
    I don't know of any doc on sequences other than the javadoc:
    http://www.oracle.com/technology/documentation/berkeley-db/je/java/com/sleepycat/persist/model/PrimaryKey.html#sequence()
    This doc will point you to info on configuring the sequence, if that's what you're interested in.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Indexing and Deadlock in SQL Server 2008?

    All,
    I am running into a deadlock in SQL Server 2008. Using a profiler I was able to determine that the deadlock happens as I am trying to select and update row(S) in table in 2 different sessions.
    The select query from the profiler is shown below
    select
    nodeinstan0_.id as id35_,
    nodeinstan0_.BPMN_ELEMENT_ID as BPMN2_35_,
    nodeinstan0_.END_DATE as END3_35_,
    nodeinstan0_.NODE_ID as NODE4_35_,
    nodeinstan0_.NODE_INSTANCE_ID as NODE5_35_,
    nodeinstan0_.NODE_NAME as NODE6_35_,
    nodeinstan0_.PROCESS_INSTANCE_ID as PROCESS7_35_,
    nodeinstan0_.START_DATE as START8_35_
    from
    NODE_INSTANCE_LOG nodeinstan0_ where
    nodeinstan0_.NODE_INSTANCE_ID= @P0 and
    nodeinstan0_.PROCESS_INSTANCE_ID= @P1 and
    (nodeinstan0_.END_DATE is null)
    My SQL Scripts for creating the table and index is show below
    CREATE TABLE [dbo].[NODE_INSTANCE_LOG](
    [id] [numeric](19, 0) IDENTITY(1,1) NOT NULL,
    [BPMN_ELEMENT_ID] [varchar](255) NULL,
    [END_DATE] [datetime] NULL,
    [NODE_ID] [varchar](255) NOT NULL,
    [NODE_INSTANCE_ID] [varchar](255) NOT NULL,
    [NODE_NAME] [varchar](2000) NULL,
    [PROCESS_INSTANCE_ID] [numeric](19, 0) NOT NULL,
    [START_DATE] [datetime] NULL,
    PRIMARY KEY CLUSTERED
    [id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
    IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
    ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    CREATE NONCLUSTERED INDEX IX_NODE_INSTANCE_LOG_Index1
    ON NODE_INSTANCE_LOG(NODE_INSTANCE_ID, PROCESS_INSTANCE_ID, END_DATE)
    INCLUDE
    ( ID, BPMN_ELEMENT_ID, NODE_ID, NODE_NAME, START_DATE);
    As I understood from number of other forums and blogs - I have included the columns under the where clause in the "COVERING index" and the rest of the columns from the select query under non clustered Index. But I am still facing a deadlock.
    Would appreciate if some once can point me in the right direction.
    regards D

    Correction to my earlier observation. Its not a select/update that's causing the deadlock but its a select/select
    I am pasting an extract from the Tracer
    <deadlock victim="process6a9048">
    <process-list>
    <process id="process6a9048" taskpriority="0" logused="15888" waitresource="KEY: 6:72057594142588928 (fbd2e857cffa)" waittime="812" ownerId="1927048" transactionname="implicit_transaction" lasttranstarted="2014-01-03T17:01:35.453" XDES="0x91cd7960" lockMode="S" schedulerid="2" kpid="3640" status="suspended" spid="56" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2014-01-03T17:01:35.723" lastbatchcompleted="2014-01-03T17:01:35.723" clientapp="jTDS" hostname="LDN-LRM-PC-189" hostpid="123" loginname="username" isolationlevel="read committed (2)" xactid="1927048" currentdb="6" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="62" sqlhandle="0x02000000e82b4000ebf38fb66978d5f9f2314a6046f957b3">
    select nodeinstan0_.id as id35_, nodeinstan0_.BPMN_ELEMENT_ID as BPMN2_35_, nodeinstan0_.END_DATE as END3_35_, nodeinstan0_.NODE_ID as NODE4_35_, nodeinstan0_.NODE_INSTANCE_ID as NODE5_35_, nodeinstan0_.NODE_NAME as NODE6_35_, nodeinstan0_.PROCESS_INSTANCE_ID as PROCESS7_35_, nodeinstan0_.START_DATE as START8_35_ from NODE_INSTANCE_LOG nodeinstan0_ where nodeinstan0_.NODE_INSTANCE_ID= @P0 and nodeinstan0_.PROCESS_INSTANCE_ID= @P1 and (nodeinstan0_.END_DATE is null) </frame>
    </executionStack>
    <inputbuf>
    (@P0 nvarchar(4000),@P1 bigint)select nodeinstan0_.id as id35_, nodeinstan0_.BPMN_ELEMENT_ID as BPMN2_35_, nodeinstan0_.END_DATE as END3_35_, nodeinstan0_.NODE_ID as NODE4_35_, nodeinstan0_.NODE_INSTANCE_ID as NODE5_35_, nodeinstan0_.NODE_NAME as NODE6_35_, nodeinstan0_.PROCESS_INSTANCE_ID as PROCESS7_35_, nodeinstan0_.START_DATE as START8_35_ from NODE_INSTANCE_LOG nodeinstan0_ where nodeinstan0_.NODE_INSTANCE_ID= @P0 and nodeinstan0_.PROCESS_INSTANCE_ID= @P1 and (nodeinstan0_.END_DATE is null) </inputbuf>
    </process>
    <process id="process6dddc8" taskpriority="0" logused="114316" waitresource="KEY: 6:72057594142588928 (44ec7e8e62c7)" waittime="602" ownerId="1927022" transactionname="implicit_transaction" lasttranstarted="2014-01-03T17:01:35.227" XDES="0x91d25950" lockMode="S" schedulerid="4" kpid="17412" status="suspended" spid="60" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2014-01-03T17:01:35.937" lastbatchcompleted="2014-01-03T17:01:35.937" clientapp="jTDS" hostname="LDN-LRM-PC-189" hostpid="123" loginname="username" isolationlevel="read committed (2)" xactid="1927022" currentdb="6" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="62" sqlhandle="0x02000000e82b4000ebf38fb66978d5f9f2314a6046f957b3">
    select nodeinstan0_.id as id35_, nodeinstan0_.BPMN_ELEMENT_ID as BPMN2_35_, nodeinstan0_.END_DATE as END3_35_, nodeinstan0_.NODE_ID as NODE4_35_, nodeinstan0_.NODE_INSTANCE_ID as NODE5_35_, nodeinstan0_.NODE_NAME as NODE6_35_, nodeinstan0_.PROCESS_INSTANCE_ID as PROCESS7_35_, nodeinstan0_.START_DATE as START8_35_ from NODE_INSTANCE_LOG nodeinstan0_ where nodeinstan0_.NODE_INSTANCE_ID= @P0 and nodeinstan0_.PROCESS_INSTANCE_ID= @P1 and (nodeinstan0_.END_DATE is null) </frame>
    </executionStack>
    <inputbuf>
    (@P0 nvarchar(4000),@P1 bigint)select nodeinstan0_.id as id35_, nodeinstan0_.BPMN_ELEMENT_ID as BPMN2_35_, nodeinstan0_.END_DATE as END3_35_, nodeinstan0_.NODE_ID as NODE4_35_, nodeinstan0_.NODE_INSTANCE_ID as NODE5_35_, nodeinstan0_.NODE_NAME as NODE6_35_, nodeinstan0_.PROCESS_INSTANCE_ID as PROCESS7_35_, nodeinstan0_.START_DATE as START8_35_ from NODE_INSTANCE_LOG nodeinstan0_ where nodeinstan0_.NODE_INSTANCE_ID= @P0 and nodeinstan0_.PROCESS_INSTANCE_ID= @P1 and (nodeinstan0_.END_DATE is null) </inputbuf>
    </process>
    </process-list>
    <resource-list>
    <keylock hobtid="72057594142588928" dbid="6" objectname="reform.dbo.NODE_INSTANCE_LOG" indexname="IX_NODE_INSTANCE_LOG_Index1" id="lock89f43000" mode="X" associatedObjectId="72057594142588928">
    <owner-list>
    <owner id="process6dddc8" mode="X"/>
    </owner-list>
    <waiter-list>
    <waiter id="process6a9048" mode="S" requestType="wait"/>
    </waiter-list>
    </keylock>
    <keylock hobtid="72057594142588928" dbid="6" objectname="reform.dbo.NODE_INSTANCE_LOG" indexname="IX_NODE_INSTANCE_LOG_Index1" id="lock81b22a80" mode="X" associatedObjectId="72057594142588928">
    <owner-list>
    <owner id="process6a9048" mode="X"/>
    </owner-list>
    <waiter-list>
    <waiter id="process6dddc8" mode="S" requestType="wait"/>
    </waiter-list>
    </keylock>
    </resource-list>
    </deadlock>
    Would appreciate if some one can point out where the issue is.

  • Process Message failed: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.

    Hi
    I am trying to process an X12 message and I am getting following error.
    Method : ProcessMessage
    Message : Process Message failed: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
    Parameter name: length
       at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
       at Q.Inbound.X12Preprocessor.getTranTypeFromFuncCode()
       at Q.Inbound.X12Preprocessor.setProcessType()
       at Q.Inbound.X12Preprocessor.getFuncGroupHeader(StreamReader sr)
       at Q.Inbound.X12Preprocessor.ProcessMessage(X12Definition& docInfo)
    Please help.
    Thanks

    Might try them over here.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral%2Cvbgeneral%2Cvcgeneral&filter=alltypes&sort=lastpostdesc
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Question about composite index and index skip scan

    Hi,
    I have a confusion.
    I have read Burleson's post on composite index column ordering (http://www.dba-oracle.com/t_composite_index_multi_column_ordering.htm) where he writes that
    "......for composite indexes the most restrictive column value(the column with the highest unique values) should be put first to trim down the result set..."
    But 10g performance tuning book tells this about INDEX SKIP SCAN ::
    "... Index Skip scanning lets a composite index be split logically into smaller subindexes. In skip
    scanning, the initial column of the composite index is not specified in the query. In other words, it is skipped.
    The number of logical subindexes is determined by the number of distinct values in the initial column.
    Skip scanning is advantageous if there are few distinct values in the leading column of the composite index and many distinct values in the non-leading key of the index......."
    So if we design Composite indexes acc. to what Burleson said then how can we take advantage of index skip scanning. These two staements oppose each other,don't they ?
    Can anybody explain this ?

    Dear,
    For the moment forget the distinct values and the compressibility. I've tried to reproduce your case here below (using jonathan lewis table script)
    create table t1
    as
    with generator as (
        select    --+ materialize
            rownum id
        from dual
        connect by
            rownum <= 10000
    select
        rownum              c1,
        mod(rownum,1000)    c2,
        mod(rownum,5000)    c3,
        mod(rownum,10000)   c4,
        lpad(rownum,10,'0') c5,
        rpad('x',5)         c6
    from
        generator    v1,
        generator    v2
    where
        rownum <= 1000
    alter table t1 add constraint t1_pk primary key (c3,c4,c5,C6);
    create index idx_1 on t1 (c1,c2);
    begin
         dbms_stats.gather_table_stats(
              ownname           => user,
              tabname           =>'T1',
              estimate_percent => 100,
              method_opt       => 'for all columns size 1'
    end;
    /and here are what I got with your two selects
    mho.sql>> SELECT c1,c2
      2  FROM t1
      3  WHERE c2 = 3;
            C1         C2
             3          3
    Elapsed: 00:00:00.00
    mho.sql>> start dispcursor
    PLAN_TABLE_OUTPUT
    SQL_ID  4dbgq3m2utd9f, child number 0
    SELECT c1,c2 FROM t1 WHERE c2 = 3
    Plan hash value: 3723378319
    | Id  | Operation            | Name  | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |*  1 |  INDEX FAST FULL SCAN| IDX_1 |      1 |      1 |      1 |00:00:00.01 |       7 |
    Predicate Information (identified by operation id):
       1 - filter("C2"=3)
    17 rows selected.
    Elapsed: 00:00:00.34
    mho.sql>> SELECT c3,c4,c5,c6
      2  FROM t1
      3  WHERE c4 = 3
      4  AND c5 = '0000000003'
      5  AND c6 = 'x    ';
            C3         C4 C5         C6
             3          3 0000000003 x
    Elapsed: 00:00:00.00
    mho.sql>> @dispcursor
    PLAN_TABLE_OUTPUT
    SQL_ID  fv62c9uqtktw9, child number 0
    SELECT c3,c4,c5,c6 FROM t1 WHERE c4 = 3 AND c5 = '0000000003' AND c6 = 'x    '
    Plan hash value: 2969533764
    | Id  | Operation            | Name  | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |*  1 |  INDEX FAST FULL SCAN| T1_PK |      1 |      1 |      1 |00:00:00.01 |       9 |
    Predicate Information (identified by operation id):
       1 - filter(("C4"=3 AND "C5"='0000000003' AND "C6"='x    '))
    17 rows selected.I didn't succeed to reproduce your index skip scan situation.
    Best Regards
    Mohamed Houri

  • Trying to understand context indexes and contains-help

    Hi
    i am using
    Achieving functionality of many preferences using one context index
    to understand context indexes and contains
    and i get the following
    Error starting at line 1 in command:
    begin
    ctx_ddl.create_preference ('nd_mcds', 'multi_column_datastore');
    ctx_ddl.set_attribute ('nd_mcds', 'columns', 'text nd, text text');
    ctx_ddl.create_section_group ('nd_sg', 'basic_section_group');
    ctx_ddl.add_ndata_section ('nd_sg', 'nd', 'nd');
    ctx_ddl.create_preference ('test_lex', 'basic_lexer');
    ctx_ddl.set_attribute ('test_lex', 'whitespace', '/\|-_+');
    end;
    Error report:
    ORA-06550: line 5, column 15:
    PLS-00302: component 'ADD_NDATA_SECTION' must be declared
    ORA-06550: line 5, column 7:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    so i am using the following to check for the error
    http://docs.oracle.com/cd/E18283_01/text.112/e16593/cddlpkg.htm#BABCBFCB
    plus
    oracle text application developer's guide
    plus
    oracle text reference
    but these have not listed that error (i have even googled this in vain)
    background::we were actually using catsearch but because of its downsides i want to implement this
    Is Achieving functionality of many preferences using one context index a good place to start when one does not know about
    context and contains??
    please post any other useful link for contains and context index that even explains
    1) fuzzy
    2) stem
    3) synonym
    4) near
    5) soundex
    6)ndata
    7)lexer
    thanks in advance

    Ndata is new to Oracle 11g. Your other posts indicate that you are using Oracle 10g, so you don't have ndata, so you get an error when you try to use it. If you want to use the 11g features that enable context indexes with contains to do all of the things that ctxcat indexes with catsearch do, then you need to upgrade to 11g.
    The online documentation is searchable. Most things regarding Oracle Text are contained in either the Oracle Text Reference or the Oracle Text Application Developer's guide.
    I suggest that you start with something very simple, then build from there.
    The following is similar to your other post that used catsearch:
    SCOTT@orcl_11gR2> CREATE TABLE mv_cat_seg_reg_prod
      2    (cat_ids       VARCHAR2 ( 7),
      3       act_status    VARCHAR2 (10),
      4       name           VARCHAR2 ( 1),
      5       email           VARCHAR2 ( 1),
      6       address1      VARCHAR2 ( 1),
      7       address2      VARCHAR2 ( 1),
      8       contact_name  VARCHAR2 ( 1),
      9       mobile           VARCHAR2 ( 1),
    10       telephone     VARCHAR2 ( 1))
    11  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO mv_cat_seg_reg_prod VALUES
      3    ('1', 'Y', 'A', 'B', 'C', 'D', 'E', 'F', 'G')
      4  INTO mv_cat_seg_reg_prod VALUES
      5    ('2', 'N', 'H', 'I', 'J', 'K', 'L', 'M', 'N')
      6  SELECT * FROM DUAL
      7  /
    2 rows created.
    SCOTT@orcl_11gR2> CREATE INDEX mv_cat_seg_reg_prod_idx
      2  ON mv_cat_seg_reg_prod (cat_ids)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  /
    Index created.
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$mv_cat_seg_reg_prod_idx$i
      2  /
    TOKEN_TEXT
    1
    2
    2 rows selected.
    SCOTT@orcl_11gR2> SELECT *
      2  FROM   (SELECT SCORE (1), name, email, address1, address2, contact_name, mobile, telephone
      3            FROM   mv_cat_seg_reg_prod
      4            WHERE  CONTAINS (cat_ids, '1', 1) > 0
      5            AND    act_status = 'Y'
      6            ORDER  BY DBMS_RANDOM.VALUE)
      7  WHERE  ROWNUM < 8
      8  /
      SCORE(1) N E A A C M T
             4 A B C D E F G
    1 row selected.

Maybe you are looking for