BookmarkSubscribeRSS Feed
yudhishtirb
Calcite | Level 5

Hello Team,

 

Greetings

 

We have 2 datasets. On these 2 datasets we are performing some merge operations.

 

What will be impact if

1. input data sets are in Sorted order

2. Input data sets are not in sorted order

 

Thanks In advance

3 REPLIES 3
Kurt_Bremser
Super User

For a DATA step merge, sorting before the merge is mandatory. Exception: if the datasets are stored in SPDS, then the sort is done automatically (this does not reduce the overall resource consumption, you just don't need to write and execute the SORT step on your own)

If you use SAS SQL, no sorting is necessary, as SQL does this on the fly. But there is a big caution: with large datasets, the utilty file of the SQL step can grow out of proportion, and the random accesses to this file will be much less performant than the combined SORT/DATA steps. Perfomance penalties of orders of magnitude have been observed.

LinusH
Tourmaline | Level 20
Addition to @Kurt_Bremser exception list: implicit sort is also being done for SPDE and most SAS/ACCESS to RDBMS engines.
Data never sleeps
LinusH
Tourmaline | Level 20
Addition to @Kurt_Bremser exception list: implicit sort is also being done for SPDE and most SAS/ACCESS to RDBMS engines.
Data never sleeps

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 985 views
  • 1 like
  • 3 in conversation