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

Our datasets are Oracle datasets that are accessed via SAS Enterprise guide through registered Metadata.  Does this method use the Oracle Indexes?

1 ACCEPTED SOLUTION

Accepted Solutions
JBailey
Barite | Level 11

Hi @DavidPhillips2 

 

SAS generates SQL and passes it to Oracle. The Oracle Optimizer determines whether, or not, it uses an index. SAS does not directly use Oracle indexes. 

 

You can help the Optimizer choose use indexes by ensuring that catalog statistics are current, and passing Oracle Hints.

Years ago, Tatyana Petrova and I wrote an SGF paper on database performance tuning. You may find it useful.


The SQL Tuning Checklist: Making Slow Queries a Thing of the Past

 

The paper discusses most of what you need to know to use indexes. I think we used Teradata for the examples, but Oracle will be similar. I will warn you; Oracle EXPLAIN PLANs are more difficult to use.

 

Best wishes,

Jeff

 

View solution in original post

5 REPLIES 5
JBailey
Barite | Level 11

Hi @DavidPhillips2 

 

SAS generates SQL and passes it to Oracle. The Oracle Optimizer determines whether, or not, it uses an index. SAS does not directly use Oracle indexes. 

 

You can help the Optimizer choose use indexes by ensuring that catalog statistics are current, and passing Oracle Hints.

Years ago, Tatyana Petrova and I wrote an SGF paper on database performance tuning. You may find it useful.


The SQL Tuning Checklist: Making Slow Queries a Thing of the Past

 

The paper discusses most of what you need to know to use indexes. I think we used Teradata for the examples, but Oracle will be similar. I will warn you; Oracle EXPLAIN PLANs are more difficult to use.

 

Best wishes,

Jeff

 

JBailey
Barite | Level 11
Thanks, Chris. That means a lot. I appreciate it.
ChrisNZ
Tourmaline | Level 20

@JBailey No worries. Credit where credit's due! 🙂

One question, do you know why libname option  sql_functions=all   is not the default?

Any downside to that justifies this precaution?

JBailey
Barite | Level 11

Hi @ChrisNZ,

 

What a great question. It is best to have questions in their own topic, So, create a new post and include my name (@JBailey) because the site will ping me. I can answer the question, quickly.

 

Best wishes,

Jeff

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 5 replies
  • 1206 views
  • 5 likes
  • 3 in conversation