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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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