<?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: RESULT SET processing in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561739#M16336</link>
    <description>&lt;P&gt;Your code makes no sense, as you mix SQL and data step statements.&lt;/P&gt;
&lt;P&gt;Please post your real code.&lt;/P&gt;</description>
    <pubDate>Mon, 27 May 2019 12:47:03 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-05-27T12:47:03Z</dc:date>
    <item>
      <title>RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561736#M16335</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets say I have source table of 10 million records.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My sql query / data step using defined libname statement has retrieved the result set with 1 million records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have imposed inobs=1, outobs=1 (proc sql) / obs=1 (data step) and so, my output dataset created has only 1 record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When we enable trace log on a data step with obs=5 in set statement , but still see that internal select query seems created with no filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data tgt.arrg_5 ;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ODBC_1: Prepared: on connection 0&lt;BR /&gt;SELECT * FROM MYDB.DWH_ARRG&lt;/P&gt;&lt;P&gt;set source.DWH_ARRG(obs=5);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;ODBC_1: Prepared: on connection 0&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;SELECT * FROM MYDB.DWH_ARRG&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;set source.DWH_ARRG(obs=5);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ODBC_2: Executed: on connection 0&lt;BR /&gt;Prepared statement ODBC_1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My query:&lt;/P&gt;&lt;P&gt;Is the result set pulled into SAS environment ? Is it stored somewhere ?&lt;BR /&gt;I do not want entire result set to be pulled into SAS environment when I impose obs=1 / inobs=1&lt;BR /&gt;Kindly help to explain the processing at the background.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 12:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561736#M16335</guid>
      <dc:creator>Kaushik2</dc:creator>
      <dc:date>2019-05-27T12:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561739#M16336</link>
      <description>&lt;P&gt;Your code makes no sense, as you mix SQL and data step statements.&lt;/P&gt;
&lt;P&gt;Please post your real code.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 12:47:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561739#M16336</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-27T12:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561741#M16337</link>
      <description>&lt;P&gt;Below is the detail after enabling trace log :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 options sastrace=',,,ds' sastraceloc=saslog nostsuffix;&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;4 libname tgt "/abc/xyz";&lt;BR /&gt;NOTE: Libref TGT was successfully assigned as follows:&lt;BR /&gt;Engine: V9&lt;BR /&gt;Physical Name: /abc/xyz&lt;BR /&gt;ODBC: AUTOCOMMIT is YES for connection 0&lt;BR /&gt;5 libname bq ODBC DSN="xxx" schema="TD";&lt;BR /&gt;NOTE: Libref BQ was successfully assigned as follows:&lt;BR /&gt;Engine: ODBC&lt;BR /&gt;Physical Name: GoogleBQ&lt;BR /&gt;6 Data tgt.arrg_5 ;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ODBC_1: Prepared: on connection 0&lt;BR /&gt;SELECT * FROM TD.DWH_ARRG&lt;BR /&gt;&lt;BR /&gt;7 set bq.DWH_ARRG(obs=5);&lt;BR /&gt;8 run;&lt;BR /&gt;ODBC_2: Executed: on connection 0&lt;BR /&gt;Prepared statement ODBC_1&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 5 observations read from the data set BQ.DWH_ARRG.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 12:54:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561741#M16337</guid>
      <dc:creator>Kaushik2</dc:creator>
      <dc:date>2019-05-27T12:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561750#M16338</link>
      <description>&lt;P&gt;don't play us stupid this can not have happened in SAS.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/260256"&gt;@Kaushik2&lt;/a&gt; wrote as you can see&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/260256"&gt;@Kaushik2&lt;/a&gt; line 6 and line 7 of the log have information included that don't happen is a data step.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;6 Data tgt.arrg_5 ;


ODBC_1: Prepared: on connection 0
SELECT * FROM TD.DWH_ARRG

7 set bq.DWH_ARRG(obs=5);&lt;BR /&gt;	&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 May 2019 13:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561750#M16338</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-05-27T13:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561751#M16339</link>
      <description>Why would someone "play us stupid"? Seems like an unnecessary accusation considering they are looking for help.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/260256"&gt;@Kaushik2&lt;/a&gt; provided the log output which, with the SASTRACE options they have turned on, shows the SQL that is passed to the DBMS by the SAS/ACCESS engine.&lt;BR /&gt;&lt;BR /&gt;I believe what they are wanting to know is, why is the SQL being passed to the DBMS not showing something equivalent to "LIMIT 5" or "TOP 5", whatever the DBMS equivalent is for OBS=5</description>
      <pubDate>Mon, 27 May 2019 13:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561751#M16339</guid>
      <dc:creator>Timmy2383</dc:creator>
      <dc:date>2019-05-27T13:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561759#M16340</link>
      <description>I agree that this person isn't likely 'playing stupid', but the code also doesn't make sense nor is the question clear. &lt;BR /&gt;&lt;BR /&gt;1. You cannot mix SQL and data step statements the way you are. Is this your actual code? What are you expecting to occur?&lt;BR /&gt;&lt;BR /&gt;2. What are you trying to do?&lt;BR /&gt;&lt;BR /&gt;3. Or what are you trying to understand?</description>
      <pubDate>Mon, 27 May 2019 15:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561759#M16340</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-27T15:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561765#M16341</link>
      <description>&lt;P&gt;Can you tell from the performance of the query whether SAS pulled over all of the records and then subset to just the first 5?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is possible that the traces that SAS shows do not include commands that would limit the number of records returned from a query.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 15:37:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561765#M16341</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-27T15:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561789#M16342</link>
      <description>&lt;P&gt;The obs=5 (a pure SAS dataset option) is not handed over to the view that's behind the ODBC, so it reads everything and transmits it to SAS, where only 5 observations are taken.&lt;/P&gt;
&lt;P&gt;My .02 $&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 19:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561789#M16342</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-27T19:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561856#M16343</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="log.JPG" style="width: 399px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29791iE665F20BE4C938BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="log.JPG" alt="log.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/29325"&gt;@Timmy2383&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/122002"&gt;@VDD&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Trying to create a subset from external database source (like DB2, GoogleBQ)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;My data step is as below. No mixing done. We see SQL lines&amp;nbsp; because the tracelog is enabled. Please refer screenshot for details.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Data tgt.arrg_5 ; set bq.DWH_ARRG(obs=5); run;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Yes, my query is why SQL displayed in the trace log does not show&amp;nbsp;"LIMIT 5" or "TOP 5", whatever the DBMS equivalent is for OBS=5. My screenshot contains similar trace log both for OBS=5 and without it. How to explain to Non-SAS people that why trace log does not show the difference.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Also, how to explain to Non-SAS people on the below statement as the trace log does not depict it. We are dealing with source tables with huge number of records.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;"It is possible that the traces that SAS shows do not include commands that would limit the number of records returned from a&amp;nbsp; &amp;nbsp; query."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Need help to prove that the intermediate result set (say 50 records) from the submitted query on DB source table( say having 100 records) does not contain “huge” number of records being pulled into SAS Environment and that only 5 observations are being “output” in SAS dataset.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 05:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/561856#M16343</guid>
      <dc:creator>Kaushik2</dc:creator>
      <dc:date>2019-05-28T05:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/562160#M16351</link>
      <description>&lt;P&gt;As a pure technical option, you could monitor network traffic between the SAS and DBMS servers to see how much data is passed.&lt;/P&gt;
&lt;P&gt;And it should be possible to log the queries on the DBMS side.&lt;/P&gt;
&lt;P&gt;And I would submit this whole issue to SAS technical support; you might have found something that is not really a bug, but suboptimal at least.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS is DWH_ARRG a table or a view in the DBMS?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 05:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/562160#M16351</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-29T05:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/562172#M16352</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp; &amp;nbsp; DWH_ARRG is a table in DBMS.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 06:49:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/562172#M16352</guid>
      <dc:creator>Kaushik2</dc:creator>
      <dc:date>2019-05-29T06:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/562181#M16353</link>
      <description>&lt;P&gt;If you can verify that the DBMS reads the whole table (and from your previous post I guess we can assume that), then this is (IMO) a problem for SAS Technical Support. It's not a big thing (as the end result will be correct), but it's a waste of time and resources with large DBMS tables.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 07:42:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/562181#M16353</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-29T07:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: RESULT SET processing</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/562372#M16358</link>
      <description>It doesn't have to pass a restriction to the database; all it has to do is to stop when it has enough records.  How many records it brings back and then throws away is likely to depend on buffer sizes and other options.&lt;BR /&gt;My experience with Oracle is that it does not read the entire data set when you have specified OBS=.&lt;BR /&gt;Something I would like to know is how to discover how many records were transferred through SAS/Access.  If you are reading a partitioned table and specify SASTRACE=',,t,' you will get a display in the log showing the number of records processed by each thread.  But not if it's a non-partitioned table.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 May 2019 17:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/RESULT-SET-processing/m-p/562372#M16358</guid>
      <dc:creator>JackHamilton</dc:creator>
      <dc:date>2019-05-29T17:45:58Z</dc:date>
    </item>
  </channel>
</rss>

