BookmarkSubscribeRSS Feed
proctice
Quartz | Level 8

I have heard that a double set is faster than a merge, but the example that I am looking at from Art Carpenter's Innovative SAS techniques (page 219) only keeps matching observations. I need it to do exactly what a merge would do only faster.  Know of any references that show how to do this? Thx!

 

4 REPLIES 4
Reeza
Super User

It would probably be helpful if you explained in some more detail with a small example. Have you looked at hash tables?

 


@proctice wrote:

I have a program that takes days to run, so I am experimenting with efficiency techniques.  I have heard that a double set is faster than a merge, but the example that I am looking at from Art Carpenter's Innovative SAS techniques (page 219) only keeps matching observations. I need it to do exactly what a merge would do only faster.  Know of any references that show how to do this? Thx!



ballardw
Super User

Is the time concern only from the "merge"?

How many records are you dealing with in your source tables?

How many variables?

If you are merging BY variables, how many by variables are you using?

Does any of the data involved reside on a network resource? or external DBMS? Both of these are potential bottlenecks.

 

or can you show the code you are currently using to combine the data sets?

Kurt_Bremser
Super User

Is it a single step that takes days, or is it a large program with many steps?

If the latter, scan the log and identify the time-consuming steps.

In both cases, run them with fullstimer, and post code and log.

proctice
Quartz | Level 8

I modified my post to focus on the double set technique instead of the broader issue of efficiency.  If anyone knows how to do that or has a reference, it might be useful to many.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 809 views
  • 0 likes
  • 4 in conversation