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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.