<?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: Slow Performance on Oracle Partitioned Table in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/512190#M15917</link>
    <description>&lt;P&gt;Adding a where clause might limit the data retrial.&lt;/P&gt;
&lt;P&gt;Check the log info how much amount of data movement is happening. Are you joining a SAS table with Oracle tables, then try considering some performance considerations like limiting the data retrial by where clause or using DBKEY= option or push your SAS table to Oracle and do in-database joins.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select TRN.TRANSACTION_KEY, ALT.TEMP_NUM_1_VALUE as alert_id
from FSK_TEMP_TABLE ALT
join FSK_ACCOUNT_KEYS_PTY KEYS on ALT.TEMP_NUM_1_VALUE = KEYS.alert_id
join FSK_REPLICATION_DATES DTE on ALT.TEMP_NUM_1_VALUE = DTE.alert_id
join fsc_account_event_fact FCT on FCT.account_key = KEYS.account_key
join FSC_TRANSACTION_DIM TRN on FCT.transaction_key = TRN.transaction_key 

Where TRN.date_key between 20171105 and 20180220;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Check my SAS paper: &lt;A href="https://www.lexjansen.com/sesug/2018/SESUG2018_Paper-154_Final_PDF.pdf" target="_blank"&gt;https://www.lexjansen.com/sesug/2018/SESUG2018_Paper-154_Final_PDF.pdf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Nov 2018 14:06:00 GMT</pubDate>
    <dc:creator>SuryaKiran</dc:creator>
    <dc:date>2018-11-12T14:06:00Z</dc:date>
    <item>
      <title>Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510706#M15826</link>
      <description>&lt;P&gt;I have been facing issues with a table on Oracle DB with ~30 Million Records. It has transactions data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created Month Wise Partition, using Date field on the table. It is working fine when I perform any query on dates having same year (within couple of seconds). If I query anything with dates having two or more than one years, the query takes very long time (more than 10-15 minutes) and large space to execute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think, there is some problem with the partitions I have created. Can someone please guide on this? Thanks in advance for your help. Please me know if any further information required on this.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 08:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510706#M15826</guid>
      <dc:creator>manishiiita</dc:creator>
      <dc:date>2018-11-06T08:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510720#M15827</link>
      <description>Do you the same performance if you issue the query directly in Oracle?</description>
      <pubDate>Tue, 06 Nov 2018 11:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510720#M15827</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-11-06T11:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510729#M15828</link>
      <description>&lt;P&gt;It might help us understand how your queries are running if you provide them, if possible can you provide your both queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also find more details in the log when you set the below options before running the queries. It you show you what queries are passed to database and how many records are fetched by SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,,d' sastraceloc=SASlog nostsuffix;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Nov 2018 13:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510729#M15828</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-11-06T13:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510753#M15830</link>
      <description>&lt;P&gt;Yes, we tried to run it from SQL developer facing same issue.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 14:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510753#M15830</guid>
      <dc:creator>manishiiita</dc:creator>
      <dc:date>2018-11-06T14:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510812#M15834</link>
      <description>&lt;P&gt;I am using above options while running SAS Query. Also, ran the query using SQL Developer and from there I have found this behavior. The queries are as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/********** 1&amp;nbsp;&amp;nbsp; ******************/&lt;BR /&gt;select TRN.TRANSACTION_KEY, ALT.TEMP_NUM_1_VALUE as alert_id&lt;BR /&gt;from FSK_TEMP_TABLE ALT&lt;BR /&gt;join FSK_ACCOUNT_KEYS_PTY KEYS on ALT.TEMP_NUM_1_VALUE = KEYS.alert_id&lt;BR /&gt;join FSK_REPLICATION_DATES DTE on ALT.TEMP_NUM_1_VALUE = DTE.alert_id&lt;BR /&gt;join fsc_account_event_fact FCT on FCT.account_key = KEYS.account_key&lt;BR /&gt;join FSC_TRANSACTION_DIM TRN on (FCT.transaction_key = TRN.transaction_key and (TRN.date_key between 20180105 and 20180520));&lt;BR /&gt;&lt;BR /&gt;/**********&amp;nbsp; 2 **********************/&lt;BR /&gt;select TRN.TRANSACTION_KEY, ALT.TEMP_NUM_1_VALUE as alert_id&lt;BR /&gt;from FSK_TEMP_TABLE ALT&lt;BR /&gt;join FSK_ACCOUNT_KEYS_PTY KEYS on ALT.TEMP_NUM_1_VALUE = KEYS.alert_id&lt;BR /&gt;join FSK_REPLICATION_DATES DTE on ALT.TEMP_NUM_1_VALUE = DTE.alert_id&lt;BR /&gt;join fsc_account_event_fact FCT on FCT.account_key = KEYS.account_key&lt;BR /&gt;join FSC_TRANSACTION_DIM TRN on (FCT.transaction_key = TRN.transaction_key and (TRN.date_key between 20171105 and 20180220));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For your further information on this, table FSC_TRANSACTION_DIM has ~33 Millions records, fsc_account_event_fact has no records, and all other tables have few hundreds of records. FSC_TRANSACTION_DIM is Monthly Partitioned using date key field with indexes on Date Key. Query #1 finishes within seconds, while Query #2 takes very long time however the date range is larger in Query #1. Query #2 goes out of TEMP tablespace (~62 GB space is there in TEMP). On looking into execution plan, I found that second query #2 is going through sort (Buffer Sort), attaching execution plan herewith.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 16:44:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510812#M15834</guid>
      <dc:creator>manishiiita</dc:creator>
      <dc:date>2018-11-06T16:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510922#M15836</link>
      <description>&lt;P&gt;Then I'm sorry, this is an Oracle tuning issue, not a SAS one.&lt;/P&gt;
&lt;P&gt;Reach to your Oracle DBA's for table or query tuning, or to an Oracle community.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 23:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/510922#M15836</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-11-06T23:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/512190#M15917</link>
      <description>&lt;P&gt;Adding a where clause might limit the data retrial.&lt;/P&gt;
&lt;P&gt;Check the log info how much amount of data movement is happening. Are you joining a SAS table with Oracle tables, then try considering some performance considerations like limiting the data retrial by where clause or using DBKEY= option or push your SAS table to Oracle and do in-database joins.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select TRN.TRANSACTION_KEY, ALT.TEMP_NUM_1_VALUE as alert_id
from FSK_TEMP_TABLE ALT
join FSK_ACCOUNT_KEYS_PTY KEYS on ALT.TEMP_NUM_1_VALUE = KEYS.alert_id
join FSK_REPLICATION_DATES DTE on ALT.TEMP_NUM_1_VALUE = DTE.alert_id
join fsc_account_event_fact FCT on FCT.account_key = KEYS.account_key
join FSC_TRANSACTION_DIM TRN on FCT.transaction_key = TRN.transaction_key 

Where TRN.date_key between 20171105 and 20180220;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Check my SAS paper: &lt;A href="https://www.lexjansen.com/sesug/2018/SESUG2018_Paper-154_Final_PDF.pdf" target="_blank"&gt;https://www.lexjansen.com/sesug/2018/SESUG2018_Paper-154_Final_PDF.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 14:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/512190#M15917</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-11-12T14:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/574029#M17634</link>
      <description>&lt;P&gt;It might be late response.&amp;nbsp; Faced the same kind of issue in Oracle query when dealing with Partition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;TRN.date_key between 20180105 and 20180520 --&amp;gt; might cause full table scan.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;use &lt;STRONG&gt;in clause&lt;/STRONG&gt; by mentioning date key (dkey1,dkey2..etc). might help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 22:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/574029#M17634</guid>
      <dc:creator>cmurugesan</dc:creator>
      <dc:date>2019-07-16T22:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/574116#M17635</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/69095"&gt;@manishiiita&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a 100% Oracle question where you should try to get support from an on-site DBA or Oracle developer - or then ask the question in an Oracle forum.&lt;/P&gt;
&lt;P&gt;I've worked with Oracle partitions in the past and remember that defining the "correct" indexes together with the partitions makes a big difference. Something a DBA helped me with. Or may be some hint could instruct Oracle to choose another execution plan - or may-be it's just about updating the statistics.....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's eventually very worthwhile to try what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/273243"&gt;@cmurugesan&lt;/a&gt;&amp;nbsp;proposes.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 10:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/574116#M17635</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-07-17T10:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/574349#M17636</link>
      <description>&lt;P&gt;Thank you all for your responses.&lt;BR /&gt;&lt;BR /&gt;This is a very old question. It was resolved long back with the help of support. Sorry for keeping it open for so long.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This problem was more of a Oracle related issue, as everyone mentioned here. Although, I had faced it in AML jobs (AGP). There were multiple aspects of this problem. First point we found was about the query being used. The queries optimised in latest hotfixes released (as recommended by support team). We have applied hotfixes in our system. Then, we have created partitions and added new index (Account_Key &amp;amp; Date_key, composite index) in above table 'Accout_Event_Fact'. DBA had also performed some analysis to optimise performance of database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel, above index was most crucial here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 21:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/574349#M17636</guid>
      <dc:creator>manishiiita</dc:creator>
      <dc:date>2019-07-17T21:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Performance on Oracle Partitioned Table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/574362#M17637</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/69095"&gt;@manishiiita&lt;/a&gt;&amp;nbsp; - would be good if you could update the post as answered as well.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 20:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Slow-Performance-on-Oracle-Partitioned-Table/m-p/574362#M17637</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-07-17T20:43:49Z</dc:date>
    </item>
  </channel>
</rss>

