This surprised me as I expected proc datasets to be fastest. Specifically if you can connect to the database once and drop all of the tables, then disconnect. As mentioned in the other answer, you should really test. Question feed. All testing I have seen from SAS users groups or presentations have always suggested that the use of one method over the other is marginal and based on many variables. As you can see, I had to split my deletes into 9 separate delete commands.
Proc Delete is faster than either PROC DATASETS or PROC SQL.
Video: Sas delete tables in sql SQL Server Tutorial 39: Deleting data from tables
Here are a few examples of how SAS programmers delete SAS tables. The first 65, rows of a table are cleared when you use the DROP TABLE statement to clear a workbook in Excel. libname test excel 'c:\ExcelFiles\'; proc sql; drop table test.'bigone$'n; quit; filename cmds dde 'excel|system'; data _null_; file cmds; put.
Restriction: You cannot use DROP TABLE or DROP INDEX on a table that is accessed by specifies a PROC SQL table. table-name can be a one-level name.
Featured on Meta.
The first creates a delete statement for each data set and then deletes. As mentioned in the other answer, you should really test.
Sign up using Email and Password.
SAS SQL Tutorialspoint
Otherwise, my unscientific observations seem to suggest that drop table in proc sql is fastest.
Related The next two both use proc datasets.
Specifically if you can connect to the database once and drop all of the tables, then disconnect. Yup - and it does appear speedier, especially if you are just wiping out a whole directory. If we are discussing datasets in SAS, I would argue that both proc sql and proc datasets are extremely similar.
PROC DELETE to remove SAS tables SAS Support Communities
Otherwise, my unscientific observations seem to suggest that drop table in proc sql is fastest. Featured on Meta.