BookmarkSubscribeRSS Feed
Obsidian | Level 7

Hi SAS Experts


When I am deleting records from a table with Proc Sql method, it is deleting the records but it is not reclaiming the space. Everytime I run the same code and inserting it again, It shows the actual number of rows but the space is increasing. 

So can I reclaim the space with Proc SQL method and also why I am seeing this issue?



Super User

"Deleting" the way you do it only marks the observations as deleted. Physical space is still used, and will only be reused under special circumstances and options.

To reclaim the space, you have to rewrite the dataset as a whole.

Tourmaline | Level 20
Another option is to compress the data set and using the REUSE option.
Over time your data set might get fragmented so still you might consider total rewrite as suggested by @Kurt_Bremser at a certain interval.
Data never sleeps

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1 like
  • 3 in conversation