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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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