BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

Hello everyone,

 

After I submited sql in SAS to created table in Oracle I want to check table status,I find the code below using dbms_stats.gather_table_stats:

 

proc sql;
&connectToOracle;
execute by oracle (
begin
dbms_stats.gather_table_stats('user', 'mytable', degree => 15);
end;);

In this code, where/what is the output table I can find the table's information? 

 

Thanks!

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

1. I reckon this question would be best answered in an Oracle forum


2. My understanding is that the results of gather_table_stats are used by Oracle to optimise queries by using the information collected rather than for human consumption.

Tom
Super User Tom
Super User

That doesn't look like the type of command that would actually return anything, but perhaps you can try using the TABLE() function to convert what it does return into something that looks like a table you can query?

select * from connection to oracle 
(
select * from table(  dbms_stats.gather_table_stats('user', 'mytable', degree => 15)  )
);

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 922 views
  • 0 likes
  • 3 in conversation