<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Performance statements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058850#M1503022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ravi if you structure your where clause the way I have illustrated in my previous post the system will pick the correct address. Use transaction ST05 to trace your select statement during run time and verify if the desired index is being picked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jul 2010 19:43:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-08T19:43:06Z</dc:date>
    <item>
      <title>Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058843#M1503015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..below select statements are taking huge time for execution..can anyone show me better syntax...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************************************&lt;/P&gt;&lt;P&gt;     SELECT appt_guid    "appointment guid&lt;/P&gt;&lt;P&gt;               appl_guid "application guid&lt;/P&gt;&lt;P&gt;              appt_type "appointment type&lt;/P&gt;&lt;P&gt;            tst_from  "contract date&lt;/P&gt;&lt;P&gt;            entry_tst "Time stamp of creation&lt;/P&gt;&lt;P&gt;       FROM scapptseg&lt;/P&gt;&lt;P&gt;     INTO TABLE it_scapptseg&lt;/P&gt;&lt;P&gt;          FOR ALL ENTRIES IN it_crmdlink&lt;/P&gt;&lt;P&gt;           WHERE appl_guid = it_crmdlink-guid_set&lt;/P&gt;&lt;P&gt;         AND appt_type IN (c_contend,c_contstart,c_contstart_or).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT guid&lt;/P&gt;&lt;P&gt;header&lt;/P&gt;&lt;P&gt;item&lt;/P&gt;&lt;P&gt; partner_no INTO TABLE it_dealer&lt;/P&gt;&lt;P&gt; FROM crmd_order_index&lt;/P&gt;&lt;P&gt; FOR ALL ENTRIES IN it_contract&lt;/P&gt;&lt;P&gt;WHERE header = it_contract-header&lt;/P&gt;&lt;P&gt;AND item = it_contract-guid&lt;/P&gt;&lt;P&gt;AND pft_30 = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT guid&lt;/P&gt;&lt;P&gt;created_by&lt;/P&gt;&lt;P&gt; header&lt;/P&gt;&lt;P&gt; product&lt;/P&gt;&lt;P&gt;  parent&lt;/P&gt;&lt;P&gt; INTO TABLE lt_phy_guids&lt;/P&gt;&lt;P&gt;    FROM crmd_orderadm_i&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN it_contract&lt;/P&gt;&lt;P&gt;   WHERE object_type = gc_object_type_item-object&lt;/P&gt;&lt;P&gt;  AND header = it_contract-header&lt;/P&gt;&lt;P&gt;  AND parent = it_contract-guid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~guid_hi&lt;/P&gt;&lt;P&gt; a~guid_set&lt;/P&gt;&lt;P&gt;  b~partner_guid&lt;/P&gt;&lt;P&gt;  b~partner_no&lt;/P&gt;&lt;P&gt;b~partner_fct&lt;/P&gt;&lt;P&gt; INTO TABLE it_dlr_link&lt;/P&gt;&lt;P&gt;  FROM crmd_link AS a INNER JOIN crmd_partner AS b&lt;/P&gt;&lt;P&gt; ON a&lt;SUB&gt;guid_set = b&lt;/SUB&gt;guid&lt;/P&gt;&lt;P&gt; FOR ALL ENTRIES IN it_temp_dlr&lt;/P&gt;&lt;P&gt; WHERE a~guid_hi   = it_temp_dlr-header&lt;/P&gt;&lt;P&gt; AND a~objtype_set = gc_object_type_convert-partner"'07'&lt;/P&gt;&lt;P&gt; AND a~objtype_hi  = gc_object_type_convert-orderadm_h&lt;/P&gt;&lt;P&gt; AND b~partner_fct IN (c_dlrgua,c_corpgua,c_persgua).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 01:47:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058843#M1503015</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2010-07-08T01:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058844#M1503016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put only one question at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For you first SQL you can check identical select using st05 and if found any identical select remove from driver table ie using in for all entries. There is no any index issue with this table it is perfectly all rights but you are missing mandt index left fields. you can make some modification in SQL. Also check for it_crmdlink is not empty.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort it_crmdlink by guid_set.

delete adjacent duplication from it_crmdlink  comparing guid_set.
if it_crmdlink [] is not initial.

SELECT appt_guid "appointment guid
appl_guid "application guid
appt_type "appointment type
tst_from "contract date
entry_tst "Time stamp of creation
FROM scapptseg client specified
INTO TABLE it_scapptseg
FOR ALL ENTRIES IN it_crmdlink
WHERE mandt = sy-mandt
      and appl_guid = it_crmdlink-guid_set
    AND appt_type IN (c_contend,c_contstart,c_contstart_or).

endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also modify Last SQL according the above way there is alos you missing the mandt fields of table and not check the driver table is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pl. do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Rgds&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ravishankar Lanjewar on Jul 8, 2010 11:53 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 05:38:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058844#M1503016</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2010-07-08T05:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058845#M1503017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when ever you use &lt;STRONG&gt;for all entries&lt;/STRONG&gt; the most important thing to remember is "first we need to check if the internal table is not empty else it will select all the entries from the Database table". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code is given for your better understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*if  it_scapptseg[] is not initial.*
SELECT appt_guid "appointment guid
appl_guid "application guid
appt_type "appointment type
tst_from "contract date
entry_tst "Time stamp of creation
FROM scapptseg
INTO TABLE it_scapptseg
FOR ALL ENTRIES IN it_crmdlink
WHERE appl_guid = it_crmdlink-guid_set
AND appt_type IN (c_contend,c_contstart,c_contstart_or).
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sajid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 05:55:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058845#M1503017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T05:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058846#M1503018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INDEX UID should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: it_crmdlink_tmp LIKE TABLE OF it_crmdlink.

IF NOT it_crmdlink[] IS INITIAL.

  it_crmdlink_tmp[] = it_crmdlink[].

  SORT it_crmdlink_tmp BY guid_set.

  DELETE ADJACENT DUPLICATES FROM it_crmdlink_tmp COMPARING guid_set.

  SELECT appt_guid   "appointment guid
         appl_guid   "application guid
         appt_type   "appointment type
         tst_from    "contract date
         entry_tst   "Time stamp of creation
    FROM scapptseg
    INTO TABLE it_scapptseg
    FOR ALL ENTRIES IN it_crmdlink_tmp
    WHERE appl_guid EQ it_crmdlink_tmp-guid_set
    AND   appt_type IN (c_contend,c_contstart,c_contstart_or).

ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INDEX HDR should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA it_contract_tmp LIKE TABLE OF it_contract.

IF NOT it_contract[] IS INITIAL.

  it_contract_tmp[] = it_contract[].

  SORT it_contract_tmp BY header parent.

  DELETE ADJACENT DUPLICATES FROM it_contract_tmp
    COMPARING header parent.

  SELECT guid
         created_by
         header
         product
         parent
  INTO TABLE lt_phy_guids
  FROM crmd_orderadm_i
  FOR ALL ENTRIES IN it_contract_tmp
  WHERE header      EQ it_contract_tmp-header
  AND   parent      EQ it_contract_tmp-guid
  AND   object_type EQ gc_object_type_item-object.

ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table CRMD_LINK = partial primary key &lt;/P&gt;&lt;P&gt;Table CRMD_PARTNER = INDEX SET&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA it_temp_dlr_tmp LIKE TABLE OF it_temp_dlr.

IF NOT it_temp_dlr[] IS INITIAL.

  it_temp_dlr_tmp[] = it_temp_dlr[].

  SORT it_temp_dlr_tmp BY header.

  DELETE ADJACENT DUPLICATES FROM it_temp_dlr_tmp
    COMPARING header.

  SELECT a~guid_hi
         a~guid_set
         b~partner_guid
         b~partner_no
         b~partner_fct
  INTO TABLE it_dlr_link
  FROM       crmd_link AS a
  INNER JOIN crmd_partner AS b
  ON a~guid_set = b~guid
  FOR ALL ENTRIES IN it_temp_dlr_tmp
  WHERE a~guid_hi     EQ it_temp_dlr_tmp-header
  AND   a~objtype_set EQ gc_object_type_convert-partner     "'07'
  AND   a~objtype_hi  EQ gc_object_type_convert-orderadm_h
  AND   b~partner_fct IN (c_dlrgua,c_corpgua,c_persgua).

ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 13:17:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058846#M1503018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T13:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058847#M1503019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for ur replies..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how to use these indexes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INDEX UID should be used.&lt;/P&gt;&lt;P&gt;INDEX HDR should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table CRMD_LINK = partial primary key &lt;/P&gt;&lt;P&gt;Table CRMD_PARTNER = INDEX SET&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 16:50:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058847#M1503019</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2010-07-08T16:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058848#M1503020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to use the INDEX with Select quries while fetching the data from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope in the above select statements they are consider the index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to check which index is used in the Select in ST05(SQL Trace).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bharani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 18:00:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058848#M1503020</guid>
      <dc:creator>BH2408</dc:creator>
      <dc:date>2010-07-08T18:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058849#M1503021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u just write above select query using:&lt;/P&gt;&lt;P&gt; INDEX UID should be used.&lt;/P&gt;&lt;P&gt;INDEX HDR should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 18:10:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058849#M1503021</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2010-07-08T18:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058850#M1503022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ravi if you structure your where clause the way I have illustrated in my previous post the system will pick the correct address. Use transaction ST05 to trace your select statement during run time and verify if the desired index is being picked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 19:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058850#M1503022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T19:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058851#M1503023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have changed the below statement...will it work for performance point of view?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         SELECT appt_guid    "appointment guid&lt;/P&gt;&lt;P&gt;                appl_guid "application guid&lt;/P&gt;&lt;P&gt;                appt_type "appointment type&lt;/P&gt;&lt;P&gt;                tst_from  "contract date&lt;/P&gt;&lt;P&gt;                entry_tst "Time stamp of creation&lt;/P&gt;&lt;P&gt;             FROM scapptseg&lt;/P&gt;&lt;P&gt;             INTO TABLE it_scapptseg&lt;/P&gt;&lt;P&gt;             FOR ALL ENTRIES IN it_crmdlink&lt;/P&gt;&lt;P&gt;             WHERE appl_guid = it_crmdlink-guid_set&lt;/P&gt;&lt;P&gt;             AND appt_type IN (c_contend,c_contstart,c_contstart_or)&lt;/P&gt;&lt;P&gt;            &lt;STRONG&gt;%_HINTS ORACLE 'INDEX("SCAPPTSEG" "SCAPPTSEG~UID")'.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 19:52:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058851#M1503023</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2010-07-08T19:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058852#M1503024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is no need of the write &lt;STRONG&gt;%hint&lt;/STRONG&gt; by default it will consider proper index, But some cases same fields contain in multiple index that time it create problem and not consider approprite index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, Check for number of execution and the index statics update. Index statics update could not be update more than 1 one week old.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinds Rgds&lt;/P&gt;&lt;P&gt;Ravi Lanjewar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ravishankar Lanjewar on Jul 9, 2010 10:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 04:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058852#M1503024</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2010-07-09T04:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Performance statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058853#M1503025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to use transaction ST05 to determine what index is actually being picked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 20:18:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-statements/m-p/7058853#M1503025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T20:18:49Z</dc:date>
    </item>
  </channel>
</rss>

