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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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