SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 67017: The table viewer in SAS® Studio does not limit the number of observations that are retrieved from a Postgres database

DetailsHotfixAboutRate It

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

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS StudioMicrosoft® Windows® for x643.79.4 TS1M5
Microsoft Windows 8 Enterprise 32-bit3.79.4 TS1M5
Microsoft Windows 8 Enterprise x643.79.4 TS1M5
Microsoft Windows 8 Pro 32-bit3.79.4 TS1M5
Microsoft Windows 8 Pro x643.79.4 TS1M5
Microsoft Windows 8.1 Enterprise 32-bit3.79.4 TS1M5
Microsoft Windows 8.1 Enterprise x643.79.4 TS1M5
Microsoft Windows 8.1 Pro 32-bit3.79.4 TS1M5
Microsoft Windows 8.1 Pro x643.79.4 TS1M5
Microsoft Windows 103.79.4 TS1M5
Microsoft Windows Server 20083.79.4 TS1M5
Microsoft Windows Server 2008 R23.79.4 TS1M5
Microsoft Windows Server 2008 for x643.79.4 TS1M5
Microsoft Windows Server 2012 Datacenter3.79.4 TS1M5
Microsoft Windows Server 2012 R2 Datacenter3.79.4 TS1M5
Microsoft Windows Server 2012 R2 Std3.79.4 TS1M5
Microsoft Windows Server 2012 Std3.79.4 TS1M5
Microsoft Windows Server 20163.79.4 TS1M5
Windows 7 Enterprise 32 bit3.79.4 TS1M5
Windows 7 Enterprise x643.79.4 TS1M5
Windows 7 Home Premium 32 bit3.79.4 TS1M5
Windows 7 Home Premium x643.79.4 TS1M5
Windows 7 Professional 32 bit3.79.4 TS1M5
Windows 7 Professional x643.79.4 TS1M5
Windows 7 Ultimate 32 bit3.79.4 TS1M5
Windows 7 Ultimate x643.79.4 TS1M5
64-bit Enabled AIX3.79.4 TS1M5
64-bit Enabled Solaris3.79.4 TS1M5
HP-UX IPF3.79.4 TS1M5
Linux for x643.79.4 TS1M5
Solaris for x643.79.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.