<?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: cluster table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556015#M582571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i dint understand the query.. can u pls explain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2007 11:46:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-19T11:46:13Z</dc:date>
    <item>
      <title>cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556008#M582564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how can we use the cluster table in the select statement? i have written one select statement with join.. its giving error like cluster tabled can not be useed in joins..&lt;/P&gt;&lt;P&gt;can anybody tell me the clue what should i do in this case?&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;pandu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 11:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556008#M582564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T11:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556009#M582565</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;See following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c60358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c60358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Srikanta Gope&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 11:28:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556009#M582565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T11:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556010#M582566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can't use JOINS for joining the Cluster and POOL tables with the transparent tables&lt;/P&gt;&lt;P&gt;first write a select for the transparent table&lt;/P&gt;&lt;P&gt;and ofr all entries of this transparent tables entries fecth the cluster/pool table entries&lt;/P&gt;&lt;P&gt;exa: BKPF and BSEG&lt;/P&gt;&lt;P&gt;where BKPF is transparent and BSEG is cluster&lt;/P&gt;&lt;P&gt;Select bukrs belnr gjahr budat wrbtr &lt;/P&gt;&lt;P&gt;from bkpf into table ITAB &lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs and gjahr = p_gjahr and budat in S_BUDAT.&lt;/P&gt;&lt;P&gt;if not itab[] is initial&lt;/P&gt;&lt;P&gt;select belnr gjahr bukrs and ebeln werks from bseg&lt;/P&gt;&lt;P&gt;into table iTAB1 for all entries in itab&lt;/P&gt;&lt;P&gt;where bukrs = itab-bukrs and&lt;/P&gt;&lt;P&gt;belnr = itab-belnr and&lt;/P&gt;&lt;P&gt;gjahr = itab-gjahr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 11:29:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556010#M582566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T11:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556011#M582567</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;You cannot write join for cluster tables like BSEG..Instead you can use FOR ALL ENTRIES options..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_BKPF TYPE STANDARD TABLE OF BKPF,&lt;/P&gt;&lt;P&gt;T_BSEG TYPE STANDARD TABLE OF BSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM BKPF&lt;/P&gt;&lt;P&gt;INTO TABLE T_BKPF&lt;/P&gt;&lt;P&gt;WHERE....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT T_BKPF IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM BSEG&lt;/P&gt;&lt;P&gt;INTO TABLE T_BSEG&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN T_BKPF&lt;/P&gt;&lt;P&gt;WHERE BUKRS = T_BKPF-BUKRS&lt;/P&gt;&lt;P&gt;AND BELNR = T_BKPF-BELNR&lt;/P&gt;&lt;P&gt;AND GJAHR = T_BKPF-GJAHR..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful answers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 11:30:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556011#M582567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T11:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556012#M582568</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;Cluster Tables (BSEG,BSEC)&lt;/P&gt;&lt;P&gt;Should be accessed via primary key - very fast retrieval otherwise very slow&lt;/P&gt;&lt;P&gt;No secondary indexes&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Select *&amp;lt;/b&amp;gt; is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.&lt;/P&gt;&lt;P&gt;Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 11:30:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556012#M582568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T11:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556013#M582569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CLUSTER TABLE is a table which has one TABLE in the DATABASE mapped to several tables declared in the Data Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is Severl DDIC tables data will be stored in One database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the reason why you cannot JOIN a cluster table as the underlying databse table has data from othertables also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cluster table is to group some of the related tables and to store the data in archive format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a normal transperent table there is one Databse table. so you can JOIN with a normal transperent table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP Table Types&lt;/P&gt;&lt;P&gt;I. Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Allows secondary indexes (SE11-&amp;gt;Display Table-&amp;gt;Indexes)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Can be buffered (SE11-&amp;gt;Display Table-&amp;gt;technical settings) Heavily updated tables should not be buffered.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Pool Tables (match codes, look up tables)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Should be accessed via primary key or&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Should be buffered (SE11-&amp;gt;Display Table-&amp;gt;technical settings)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;No secondary indexes&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select * is Ok because all columns retrieved anyway&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;III. Cluster Tables (BSEG,BSEC)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Should be accessed via primary key - very fast retrieval otherwise very slow&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;No secondary indexes&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Can not be buffered&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IV. Buffered Tables (includes both Transparent &amp;amp; Pool Tables)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also refer the link for examples&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3725819"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c60358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c60358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*&lt;STRONG&gt;reward for useful answers&lt;/STRONG&gt;*&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 11:33:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556013#M582569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T11:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556014#M582570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pandurangarao,&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;General Tips:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Test using the NativeDB engine. &lt;/P&gt;&lt;P&gt;2.Testing against another engine is not adequate. &lt;/P&gt;&lt;P&gt;3.Avoid JOIN if you can, test often if you can&amp;#146;t &lt;/P&gt;&lt;P&gt;4.Avoid subqueries always &lt;/P&gt;&lt;P&gt;5.Select using primary keys when at all possible. &lt;/P&gt;&lt;P&gt;6.Always select using a key. &lt;/P&gt;&lt;P&gt;7.Be sure to include both your where and order by columns in your keys. &lt;/P&gt;&lt;P&gt;8.Try your join from several directions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes, the way you join can affect the engine. This is more apparent with Native DB than MyISAM or InnoDB. Have a look at these two queries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;QUERIES&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;select pub_articles.article_id&lt;/P&gt;&lt;P&gt;from pub_articles&lt;/P&gt;&lt;P&gt;inner join article_edition_lookup on&lt;/P&gt;&lt;P&gt;pub_articles.article_id=article_edition_lookup.article_id and&lt;/P&gt;&lt;P&gt;pub_articles.publication_id=article_edition_lookup.publication_id and&lt;/P&gt;&lt;P&gt;publication_date=&amp;#146;2007-06-07&amp;amp;#8242;&lt;/P&gt;&lt;P&gt;where pub_articles.publication_id=2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select article_id&lt;/P&gt;&lt;P&gt;from article_edition_lookup&lt;/P&gt;&lt;P&gt;inner join pub_articles using (article_id, publication_id)&lt;/P&gt;&lt;P&gt;where publication_id=2 and publication_date=&amp;#146;2007-06-07&amp;amp;#8242;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Conclusion of the Queries:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;They look similar.&lt;/P&gt;&lt;P&gt; Same tables. &lt;/P&gt;&lt;P&gt;Same basic criteria. &lt;/P&gt;&lt;P&gt;In fact the explain output looks nearly identical. &lt;/P&gt;&lt;P&gt;But, the first takes 20 seconds on cluster and the second takes .02 seconds. Now, some MySQL internals person may be able to look at this and know why, but to me, I just have to test them to see.&lt;/P&gt;&lt;P&gt; (If anyone cares, the primary key on pub_articles is publication_id, article_id and the PK on article_edition_lookup is publication_id, publication_date, article_id).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhayanandh .S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 11:39:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556014#M582570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T11:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556015#M582571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i dint understand the query.. can u pls explain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 11:46:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556015#M582571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T11:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: cluster table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556016#M582572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pandurangarao,&lt;/P&gt;&lt;P&gt;            In the first Query,&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Step1:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;  we would like to select "&amp;lt;b&amp;gt;article_id&amp;lt;/b&amp;gt;" from the table pub_articles.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Step2:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;  Here we would like to compare the primary keys of  pub_articles table which are respectively &lt;/P&gt;&lt;P&gt;a) "&amp;lt;b&amp;gt;article_id&amp;lt;/b&amp;gt;" and&lt;/P&gt;&lt;P&gt;b) "&amp;lt;b&amp;gt;publication_id&amp;lt;/b&amp;gt;"&lt;/P&gt;&lt;P&gt; against the foreign key table article_edition_lookup.&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Step3:&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt; Providing the date for pub_articles through the functional field "&amp;lt;b&amp;gt;publication_date&amp;lt;/b&amp;gt;" along with validation of "&amp;lt;b&amp;gt;publication_id&amp;lt;/b&amp;gt;" from this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please feel free to ask for any more queries...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhayanandh.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2007 12:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cluster-table/m-p/2556016#M582572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-19T12:09:21Z</dc:date>
    </item>
  </channel>
</rss>

