BookmarkSubscribeRSS Feed
jimmyt
Calcite | Level 5

Hello,

I am in the process of moving many of my SQL codes from SQL to SAS.  The platform is Teradata and i've been using SQL assistant to run all my code.  When I run proc SQL in SAS it takes forever to run code that takes seconds in SQL assistant.  Is there an issue with moving teradara to a SAS dataset? does anybody know of a way to speed this up?  They're pretty simple queries that join 3 tables together

Thanks in Anticipation!

3 REPLIES 3
TomKari
Onyx | Level 15

You've opened a fairly enormous topic here.

Teradata is a product that is highly optimized for the types of operations that are required for tabulation, reporting, and analytics. Native SAS datasets don't apply the same optimizations right out of the box.

You can probably improve your native SAS dataset performance by creating indexes on the approriate variables, but the downside is increased effort and disk space.

SAS does have a product called SPDS, which is designed to improve processing speed on large datasets. However, it may be an additional expense, and it is a LOT of work to set up.

Finally, I suggest that you post some specific examples, and the folks who follow this discussion will probably have suggestions.

Tom

RichardinOz
Quartz | Level 8

Assuming you have SAS/Access to Teradata, and want to retain your data in Teradata tables: have you investigated using SQL Passthrough for your existing code? 

See

http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n15q85z7nwkl3pn189...

Advantages:

Minimal changes (if any) to your existing SQL code

SAS can be used to initiate the SQL code and also provide downstream analysis

No need to create indexes etc in SAS

I have not tried this with Teradata (and note the restriction on DATABASE) but I have done the equivalent in Oracle with success.

Richard in Oz

jimmyt
Calcite | Level 5

Sorry for the delay in responding.

Thanks Richard, this is perfect and my queries are running so much faster now!

Thank you so much for taking the time to help solve my issue

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1169 views
  • 1 like
  • 3 in conversation