<?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: Fast proc sort in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859701#M339633</link>
    <description>&lt;P&gt;Following up on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;'s hint, Troy Hughes has a bunch of papers (and books) on rolling your own parallel processing in SAS, e.g.:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings17/0870-2017.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings17/0870-2017.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings16/11888-2016.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings16/11888-2016.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Feb 2023 13:25:32 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2023-02-20T13:25:32Z</dc:date>
    <item>
      <title>Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859656#M339618</link>
      <description>&lt;P&gt;I have a 42gb table, 44 variables, 34 million observations, a proc sort that takes about 44 minutes to sort by 7 variables.&lt;BR /&gt;I wonder if anyone has any specific advice that is used in these cases to reduce processing times. Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 22:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859656#M339618</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-02-19T22:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859658#M339619</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3574"&gt;@mariopellegrini&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a 42gb table, 44 variables, 34 million observations, a proc sort that takes about 44 minutes to sort by 7 variables.&lt;BR /&gt;I wonder if anyone has any specific advice that is used in these cases to reduce processing times. Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;First thing is make sure that you are using the fastest disk on your system. Typically the WORK disk is assigned to a fast disk so try sorting from/to WORK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also since you seem to have long records perhaps &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/ledsoptsref/n014hy7167t2asn1j7qo99qv16wa.htm" target="_self"&gt;COMPRESS= dataset option&lt;/A&gt;&amp;nbsp;will help.&amp;nbsp; You might end up using more CPU time, but it should save on disk I/O operations, which are orders of magnitude slower.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have access to it you might try using the &lt;A href="https://support.sas.com/rnd/scalability/spde/when.html" target="_self"&gt;SPDE engine&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 23:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859658#M339619</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-02-19T23:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859659#M339620</link>
      <description>&lt;P&gt;Sometimes the TAGSORT option can help. READ the documentation on the option as one of the key bits is "&lt;/P&gt;
&lt;DIV class="xis-eDocBody"&gt;
&lt;DIV class="xis-refDictEntry"&gt;
&lt;DIV class="xis-details"&gt;
&lt;DIV id="p0x0xr1gt84sycn149qcgjtjs94k" class="xis-subTopic"&gt;
&lt;DIV id="n0uw66w3chihxhn1vrqkda5tgs8g" class="xis-topicContent"&gt;
&lt;DIV id="n17szr066zvlxkn1a8dy1dn5ixlo" class="xis-paragraph"&gt;in cases where the total number of bytes of the sort keys is small compared with the length of the record, temporary disk use is reduced considerably".&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;Proc sort in effect makes three copies of the data set so limitations of disc space come up and can result in a lot of extra disc accesses in temporary swap files. So where your temp space resides can make a difference. The Tagsort options reduces how much is swapped but working on a faster disc makes a difference.&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;If you are working in a networked environment on a server your allocated work space may be a choke point.&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;You might also check on your setting for the SORTSIZE system option. If you have more memory available than that you could set the SORTSIZE option in the Proc Sort code to use more memory for that run to reduce the amount of disc swapping likely to occur.&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;If there is any chance that the data may already be in sort order you might also use the PRESORTED option which will investigate the set an only sort if not in sort order of the BY the by variables.&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;If your data is coming from an external data source, such as a data base, you might have that source order the records before use by SAS.&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;Also consider if you really need to sort by all 7 variables.&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 19 Feb 2023 23:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859659#M339620</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-19T23:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859662#M339623</link>
      <description>&lt;P&gt;How are you creating or updating this table in the first place? If you are updating it, it may be possible to keep the sort order intact to avoid sorting it entirely. If the table is being sourced from an external database, sort the data there while reading it as it will most likely be faster than sorting in later in SAS.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 23:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859662#M339623</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-02-19T23:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859666#M339625</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consider trying Bufsize= and Bufno = options for the output table.&amp;nbsp; Plese see online documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/vdmmlcdc/8.1/lesysoptsref/p1d8hx95jb53wqn0zzvawxw94nvi.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/vdmmlcdc/8.1/lesysoptsref/p1d8hx95jb53wqn0zzvawxw94nvi.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 03:03:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859666#M339625</guid>
      <dc:creator>john_mccall</dc:creator>
      <dc:date>2023-02-20T03:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859670#M339626</link>
      <description>&lt;P&gt;And following&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;'s line of thought:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do you need to sort the table in first place? What do you intend to do with it? Eventually creating an index would be better ...but it depends on what you intend to do with the table.&lt;/P&gt;
&lt;P&gt;If you don't need all the columns then drop them when reading the data.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 08:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859670#M339626</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-02-20T08:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859691#M339630</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
Here could give you a clue.
*/

data _11 _12 _13 _14 _15 _16;
 set sashelp.class;
      if age=11 then output _11;
 else if age=12 then output _12;
 else if age=13 then output _13;
 else if age=14 then output _14;
 else if age=15 then output _15;
 else if age=16 then output _16;
run;

data want;
 set _11 _12 _13 _14 _15 _16;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Feb 2023 11:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859691#M339630</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-20T11:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859701#M339633</link>
      <description>&lt;P&gt;Following up on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;'s hint, Troy Hughes has a bunch of papers (and books) on rolling your own parallel processing in SAS, e.g.:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings17/0870-2017.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings17/0870-2017.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings16/11888-2016.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings16/11888-2016.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 13:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859701#M339633</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-02-20T13:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859848#M339683</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks.&amp;nbsp;I tried to look for documentation on the SORTSIZE option, but I don't know what values to set it to see if it improves performance. Do you have any examples?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 07:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859848#M339683</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-02-21T07:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859854#M339686</link>
      <description>&lt;P&gt;One more approach could be:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=sashelp.cars;
run;
/* sashelp.cars has 428 obs so... */


/* ...sort it in parts (with a macro loop probably) */
proc sort data=sashelp.cars(firstobs=1   obs=150) out=part1;
  by model make origin;
run;

proc sort data=sashelp.cars(firstobs=151 obs=300) out=part2;
  by model make origin;
run;

proc sort data=sashelp.cars(firstobs=301 obs=428) out=part3;
  by model make origin;
run;


/* ...and combine with interleaving */
data sorted;
  set part1 part2 part3;
  by model make origin;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and don't forget about data compression if variables are long.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 07:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859854#M339686</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-02-21T07:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859856#M339688</link>
      <description>&lt;P&gt;BEFORE you start tinkering, analyze.&lt;/P&gt;
&lt;P&gt;What does the log of the PROC SORT say?&lt;/P&gt;
&lt;P&gt;Run it with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options fullstimer;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;set and then post the log here. This will give us a picture of the bottleneck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The procedure will read and write the whole data 4 times (read the dataset, write the temporary file, read the temporary file, write the result), so you move ~170 G through your storage, which translates to 4 G/min, or ~ 67 M/sec, which is not what proper current disks can do (200 Μ/sec for a single, non-striped SSD).&lt;/P&gt;
&lt;P&gt;While you run the procedure, take a look at the log to see when the first message (observations read) appears. If your source library is in fact something which goes over a slow network, this may explain the bad performance.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 07:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859856#M339688</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-02-21T07:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859995#M339742</link>
      <description>Here are the options:&lt;BR /&gt;SORTSIZE=n | nK | nM | nG | nT | hexX | MIN | MAX&lt;BR /&gt;Note: You can also use the KB, MB, GB, and TB syntax notations.&lt;BR /&gt;Specifies the amount of memory that is available to the SORT procedure.&lt;BR /&gt;&lt;BR /&gt;There is also sortcutp&lt;BR /&gt;&lt;BR /&gt;SORTCUTP=n | nK | nM | nG | MIN | MAX | hexX&lt;BR /&gt;Note: You can also use the KB, MB, and GB syntax notation.&lt;BR /&gt;Specifies the size of the data in bytes above which the host sort is likely to perform more efficiently than the internal sort. SORTCUTP is used only when SORTCUT=0.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Feb 2023 19:30:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/859995#M339742</guid>
      <dc:creator>john_mccall</dc:creator>
      <dc:date>2023-02-21T19:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860090#M339788</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I report here the log with the fulltimer option (the time + is lower perhaps because I'm using another server, the development one, but in the production logs it took 43'. This is another thing I need to understand)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;39 proc sort data = TAB_INP out = work.etls_sortedxref(keep=COD_TIPO_MOV DT_CONTABILE GARANZIA&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;40 ID COD_MOVIMENTO NUM_COMPONENTE num_rev_contr POLIZZA TS_INIZIO_VALIDITA TS_FINE_VALIDITA ANTIRACKET BANCA CODICEFILIALE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;40 ! CONT_FRAZ&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;41 CONT_RINNOVO DT_EFFETTO DT_RIATTIVAZIONE DT_SCADENZA DT_SOSPENSIONE DES_GARANZIA EMS_MOVIMENTO GESTOCOMMERCIALE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;41 ! INTERMEDIARIO2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;42 INVOICETYPE EU_IMP_LORDO EU_PREMIO_NETTO PRODOTTO FAM_PRODOTTO EU_PROV_ACQ_INT2 PROVINCIA EU_PROVV_ACQ&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;42 ! EU_PROVV_GG_PRECONT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;43 RAMOBILANCIO EU_SSN EU_TASSE_PREMI TIPOLOGIA_PAGAMENTO TIPOLOGIA_PAGMOVIMENTO EU_TOT_TASSE EU_TXCOMM EU_TXTASSA)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;44 ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;45 by COD_TIPO_MOV DT_CONTABILE GARANZIA ID COD_MOVIMENTO NUM_COMPONENTE num_rev_contr POLIZZA&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;46 TS_FINE_VALIDITA;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;47 run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;NOTE: There were 35800340 observations read from the data set TAB_INP.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;NOTE: The data set WORK.ETLS_SORTEDXREF has 35800340 observations and 40 variables.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;NOTE: PROCEDURE SORT ha utilizzato (tempo totale di elaborazione):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;real time 7:34.39&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;user cpu time 1:11.46&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;system cpu time 1:14.73&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;memory 31614078.68k&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;OS Memory 31632696.00k&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Timestamp 22/02/2023 08:07:18 m.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Step Count 6 Switch Count 565&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 14:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860090#M339788</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-02-22T14:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860098#M339794</link>
      <description>&lt;P&gt;Your CPU needs roughly 2.5 minutes, while in real time you spend 3 times of that. This means that (as expected) I/O is your bottleneck (if that CPU time is actually that of several threads running in parallel, the disproportion is even stronger). But 7 minutes for a 42 G sort isn't bad at all.&lt;/P&gt;
&lt;P&gt;So it looks that your production server (if it has the same CPU hardware) is congested by multiple processes running in parallel; if these are SAS processes using the same WORK disks, you need to invest there.&lt;/P&gt;
&lt;P&gt;Think of adding disks (same size as WORK) and use them for UTILLOC to split the load.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 09:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860098#M339794</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-02-22T09:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860106#M339800</link>
      <description>&lt;P&gt;To add to what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;/P&gt;
&lt;P&gt;Table name&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;work.etls_sortedxref&lt;/EM&gt; makes me think that this is a step of DIS generated SCD2 loader code. If so and you're actually trying to improve performance of the whole load process then I've ended up more than once to create a custom transformation. This is especially true for target tables in a database.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The SAS log you shared doesn't show it but do you also get in the log the compression messages? If not then setting option compress=yes would likely improve elapsed times.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 10:17:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860106#M339800</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-02-22T10:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860128#M339812</link>
      <description>&lt;P&gt;Thanks for the very useful information. What exactly do you mean by "adding disks"? Do you always add disks inside the sas work? I didn't quite understand what to do&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 11:41:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860128#M339812</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-02-22T11:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860153#M339824</link>
      <description>&lt;P&gt;"Disk" depends on how your storage is set up. In today's world, this often means fully virtualized devices. Talk with your sysadmins how you can improve your I/O throughput, or how you can schedule jobs in a way that reduces contention for available resources.&lt;/P&gt;
&lt;P&gt;A separate UTILLOC (this is where the temporary files during sorting reside) only makes sense if you can add devices that do not share hardware with the existing WORK.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 12:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860153#M339824</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-02-22T12:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860166#M339830</link>
      <description>&lt;P&gt;Thanks Kurt. I am also attaching the log for the production server. It can be seen that the gap between real time 44:07.42 and cpu time 3:27.46 is even greater. Does this support even more the thesis that you have exposed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;proc sort data = TAB_INP out = work.etls_sortedxref(keep=COD_TIPO_MOV DT_CONTABILE GARANZIA&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;ID COD_MOVIMENTO NUM_COMPONENTE num_rev_contr POLIZZA TS_INIZIO_VALIDITA TS_FINE_VALIDITA ANTIRACKET BANCA CODICEFILIALE CONT_FRAZ&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;CONT_RINNOVO DT_EFFETTO DT_RIATTIVAZIONE DT_SCADENZA DT_SOSPENSIONE DES_GARANZIA EMS_MOVIMENTO GESTOCOMMERCIALE INTERMEDIARIO2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;INVOICETYPE EU_IMP_LORDO EU_PREMIO_NETTO PRODOTTO FAM_PRODOTTO EU_PROV_ACQ_INT2 PROVINCIA EU_PROVV_ACQ EU_PROVV_GG_PRECONT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;RAMOBILANCIO EU_SSN EU_TASSE_PREMI TIPOLOGIA_PAGAMENTO TIPOLOGIA_PAGMOVIMENTO EU_TOT_TASSE EU_TXCOMM EU_TXTASSA);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;by COD_TIPO_MOV DT_CONTABILE GARANZIA ID COD_MOVIMENTO NUM_COMPONENTE num_rev_contr POLIZZA&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;TS_FINE_VALIDITA;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;NOTE: There were 34159292 observations read from the data set TAB_INP.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;NOTE: The data set WORK.ETLS_SORTEDXREF has 34159292 observations and 40 variables.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;real time 44:07.42&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;cpu time 3:27.46&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 14:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860166#M339830</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-02-22T14:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860172#M339834</link>
      <description>&lt;P&gt;A few interesting takes on sorting.&lt;/P&gt;
&lt;P&gt;But are thay actuallay faster than a "standard" PROC SORT?&lt;/P&gt;
&lt;P&gt;If so, I think the developers of PROC SORT didn't do a good job...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For SPDE: it's included in Base SAS, so it's availble to "everyone" from a license and a deployment perspective.&lt;/P&gt;
&lt;P&gt;One benefit of SPDE it's the implict BY sorting - if you need this sort order occasionally you can have the next step call you source with a BY - no need to explict sort it. Thus lessen the need for IO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than that I think minimize swapping is prioritized. Check how much available memory you have, and ramp up MEMSIZE and SORTSIZE accordingly.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 14:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860172#M339834</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-02-22T14:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fast proc sort</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860173#M339835</link>
      <description>&lt;P&gt;Yes of course, it is a Data Integration process. Does this mean anything in particular?&lt;BR /&gt;Yes, I confirm that the COMPRESS option will be introduced to improve performance&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 14:19:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fast-proc-sort/m-p/860173#M339835</guid>
      <dc:creator>mariopellegrini</dc:creator>
      <dc:date>2023-02-22T14:19:51Z</dc:date>
    </item>
  </channel>
</rss>

