BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

hi all,

Can anyone please explain to me the advantage of the one  over the other or any good article  i can  read about this?

If i use the 1st i know  i can link all the oracle  tables to SAS and  play with them(update,join,....) and then save them back in  Oracle. The 2nd one is kinda annoying to me but i ve seen many times ppl use it more then the 1st one.Why? Memory-wise,CPU wise?

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
Fugue
Quartz | Level 8

In my view, one of the advantages of using pass-through is that you can be sure that the code, table joins, etc is processed by the DBMS engine.

With libname access, SAS may not be able to pass the code to the DBMS for processing. As a result, expensive table joins may be passed in their entirety back to SAS to handle -- which increases network traffic, table sizes, processing time, etc.

However, libname method can be much easier to work with since you can dispense with having to use DBMS-specific code.

If joins and code are fairly straightforward, and I am fairly confident that SAS will pass the query to the DBMS for processing, then I will use the libname method.

Otherwise, I use pass-through.

View solution in original post

4 REPLIES 4
Fugue
Quartz | Level 8

In my view, one of the advantages of using pass-through is that you can be sure that the code, table joins, etc is processed by the DBMS engine.

With libname access, SAS may not be able to pass the code to the DBMS for processing. As a result, expensive table joins may be passed in their entirety back to SAS to handle -- which increases network traffic, table sizes, processing time, etc.

However, libname method can be much easier to work with since you can dispense with having to use DBMS-specific code.

If joins and code are fairly straightforward, and I am fairly confident that SAS will pass the query to the DBMS for processing, then I will use the libname method.

Otherwise, I use pass-through.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

Thanks for the nice explanation Fugue.

So if i have lets say 2M - 8M record tables i should use pass through ,huh even though the joins are quite straightforward ?

Fugue
Quartz | Level 8

I'd be inclined to agree with you as a general rule -- explicit PROC SQL pass-through would be the superior choice in that case.

SASKiwi
PROC Star

In my experience I've found Oracle more fiddly to tune well compared to other databases such as SQL Server. In which case PROC SQL pass-through gives you better control to do things like Oracle hints for parallelisation for example.

Also dont forget other SAS options for tuning database queries. My favourite is READBUFF = this can have a huge impact on query performance, and they work equally well for LIBNAME and pass-through. 

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!

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
  • 4856 views
  • 2 likes
  • 3 in conversation