Problem Note 67017: The table viewer in SAS® Studio does not limit the number of observations that are retrieved from a Postgres database
When you open any table that is not from a Postgres database in the table viewer, SAS® Studio 3.7x and SAS® Studio 3.8x can limit the number of rows that are selected from the table in the following ways:
- In SAS Studio 3.7 and 3.71, the table viewer opens with 100 rows of the table selected and displayed initially.
- In SAS Studio 3.8 and 3.81, you can set a new preference, Preferences ► Tables ► Rows Per Page, to determine how many rows are selected and displayed when the table viewer initially opens a table.
When you open a Postgres table in the table viewer in SAS Studio 3.7x and 3.8x, there is no limit applied to the number of rows that are selected from the table. Regardless of your preference setting, SAS Studio retrieves all rows from the table. The number of rows displayed on each page of the table viewer is still determined by the criteria above. However, the act of retrieving all rows can cause significant performance delays when you are opening very large Postgres tables.
The workaround is to use code that can display the table but also limit the number of rows selected. In order to use this limit, you need to first apply a hot fix for SAS/ACCESS® Interface to PostgreSQL. The hot fix is provided in SAS Note 66505, “The OBS= option does not generate a limit clause when you use SAS/ACCESS® Interface to PostgreSQL to access a Yellowbrick database.”
After the hot fix is applied, you can use syntax that is similar to the following for displaying the table with a limited number of rows to retrieve:
proc sql;
select * from table-name (obs=100);
quit;
With the above hot fix, you can also limit the number of observations via the PRINT procedure:
proc print data = table-name (firstobs=300 obs=400);
run;
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | SAS Studio | Microsoft® Windows® for x64 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 8 Enterprise 32-bit | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 8 Enterprise x64 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 8 Pro 32-bit | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 8 Pro x64 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 8.1 Enterprise 32-bit | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 8.1 Enterprise x64 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 8.1 Pro 32-bit | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 8.1 Pro x64 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows 10 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows Server 2008 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows Server 2008 R2 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows Server 2008 for x64 | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows Server 2012 Datacenter | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows Server 2012 R2 Datacenter | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows Server 2012 R2 Std | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows Server 2012 Std | 3.7 | | 9.4 TS1M5 | |
Microsoft Windows Server 2016 | 3.7 | | 9.4 TS1M5 | |
Windows 7 Enterprise 32 bit | 3.7 | | 9.4 TS1M5 | |
Windows 7 Enterprise x64 | 3.7 | | 9.4 TS1M5 | |
Windows 7 Home Premium 32 bit | 3.7 | | 9.4 TS1M5 | |
Windows 7 Home Premium x64 | 3.7 | | 9.4 TS1M5 | |
Windows 7 Professional 32 bit | 3.7 | | 9.4 TS1M5 | |
Windows 7 Professional x64 | 3.7 | | 9.4 TS1M5 | |
Windows 7 Ultimate 32 bit | 3.7 | | 9.4 TS1M5 | |
Windows 7 Ultimate x64 | 3.7 | | 9.4 TS1M5 | |
64-bit Enabled AIX | 3.7 | | 9.4 TS1M5 | |
64-bit Enabled Solaris | 3.7 | | 9.4 TS1M5 | |
HP-UX IPF | 3.7 | | 9.4 TS1M5 | |
Linux for x64 | 3.7 | | 9.4 TS1M5 | |
Solaris for x64 | 3.7 | | 9.4 TS1M5 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2021-01-25 14:42:52 |
Date Created: | 2020-12-01 18:10:37 |