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

I have a large table that I cannot open directly in SAS due to size.  I tried selecting only the top ten rows but the query is taking forever.  Is there a reason why selecting the top ten rows would have a delay at all?

 

data myTable_temp;
set mylibrary.myTable (obs=10);
run;

1 ACCEPTED SOLUTION

Accepted Solutions
DavidPhillips2
Rhodochrosite | Level 12

I learned that a count(*) on a few actually takes a long time.  When querying large views the idea is to use a where clause.

View solution in original post

6 REPLIES 6
ballardw
Super User

Is your MyLibrary another database and not a native SAS data set?

Or located on a network with possible comminication issues?

DavidPhillips2
Rhodochrosite | Level 12

How do I tell?  I see it as a SAS dataset under shared data in Enterprise Guide.

DavidPhillips2
Rhodochrosite | Level 12

I tried doing a select count(*) that spins in Oracle on the table for five mintues with no result.

ballardw
Super User

@DavidPhillips2 wrote:

How do I tell?  I see it as a SAS dataset under shared data in Enterprise Guide.


Assuming this is how to see what/where a library or data set may be

In Libraries under the server list right click on the library and select Properties from the menu. It will show the Path to the library and other

properties.

DavidPhillips2
Rhodochrosite | Level 12

I learned that a count(*) on a few actually takes a long time.  When querying large views the idea is to use a where clause.

Haikuo
Onyx | Level 15

Try this:

proc sql inobs=10;
create table mytable_temp as
select * from mylibrary.mytable;
quit;

sas-innovate-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 6 replies
  • 5438 views
  • 3 likes
  • 3 in conversation