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!
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!
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?
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.
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.
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.
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.