BookmarkSubscribeRSS Feed
ssaha
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?

 

 

2 REPLIES 2
Kurt_Bremser
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.

LinusH
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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 756 views
  • 1 like
  • 3 in conversation