BookmarkSubscribeRSS Feed

Dear all,

 

I am merging two datasets of size 30GB and 2 GB using proc sql. How much memory is required to accomplish this merge.

 

thanks

Lokendra

4 REPLIES 4
kiranv_
Rhodochrosite | Level 12

There are many aspects which impact a query. but it looks this is perfect case where it is better to use hash join instead of SQL join. Please furnish more information related to data, so that someone can help you better. Usually databases have the capacity to guess amount of space and time a query runs through a explain plan, if not sure SAS has something available that can give space kind of information.

SASKiwi
PROC Star

If you run your query using the SAS option FULLSTIMER it will report how much memory it is using. You can increase your MEMSIZE setting if you are running out of memory - please note this option must be set at the invocation of your SAS session.

Kurt_Bremser
Super User

That's not so much a memory problem, but a disk storage problem. Proc sql will need space to do the sorting and for the utility file, and the size of your output will depend on the variables named in the select, and the relationship between the two tables.

 

Depending on the data and your needs, you might find that SQL is not a good solution at all. See Maxim 10.

ChrisNZ
Tourmaline | Level 20

This question cannot be answered without you giving a lot more information.

At least:

1. Are the tables sorted? indexed?

2. What sort of join is it? Cartesian, inner, left etc?

3. How many rows in each table?

4. Is(are) the join key(s) unique in either or both tables?

5. What is (roughly) the expected number of rows in the output table?

 

 

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1030 views
  • 0 likes
  • 5 in conversation