BookmarkSubscribeRSS Feed
JanKwiatkowski
Calcite | Level 5
Does anyone know why during left join in roc SQL T1 (medium size table around 80k rows) and T2 (very large table with 3bln rows) Sas doesn't use index?
But during inner join proc SQL it uses index and performance is great.
I've used MSGLEVEL=I option to see what's happening in log.
2 REPLIES 2
ballardw
Super User

It may help to answer such a question by providing the log with the code and all the notes.

 

And indicate which data set(s) have index on which variable(s).

LinusH
Tourmaline | Level 20

You can also add the undocumented PROC SQL options _method and _tree to get more details on how PROC SQL is evaluating the query.

The optimal would a hash join, which requires that your left table fits into memory and uses index on the right table for the join criteria. You can affect the optimizer to chose this by adjusting the BUFFERSIZE option, but you cannnot force it.

Data never sleeps

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 231 views
  • 1 like
  • 3 in conversation