In some cases, SAS processes
data in more than one pass through the same set of rows. Spooling
is the process of writing rows that have been retrieved during the
first pass of a data read to a spool file. In the second pass, rows
can be reread without performing input and output to the DBMS a second
time. When data must be read more than once, spooling improves performance.
Spooling also guarantees that the data remains the same between passes,
as most
SAS/ACCESS interfaces do not support member-level locking.
MySQL: Do
not use SPOOL=NO with the MySQL interface.
Teradata: SPOOL=NO
requires
SAS/ACCESS to issue identical SELECT statements to Teradata
twice. In addition, because the Teradata table can be modified between
passes, SPOOL=NO can cause data integrity problems. Use SPOOL=NO with
discretion.