January 16th, 2013, 11:48 AM
Calculation of memory released after Deletion
Hi friends I have got a problem regarding calculation of memory released after deletion.Here is the Scenario.
I have some particular table in my database Say,StudentInfo that contains info regarding student.
If i delete some row from the table ,then is it possible to find the memory released after deletion through a query.
I will be grateful if anyone can help me with this...
January 16th, 2013, 11:56 AM
You mean disk space?
it is does not make a lot of sense because when you delete record from table, you creating record in transaction log and not physically empty space. Space will become available after you compact and reorganize your table... and database space allocation depends from how it was define in database properties...
January 16th, 2013, 12:42 PM
Actually in a project i got this issue.
In a table a column was there which keeps record of how much memory(in KBs) is released after deletion of some data from a other table.
So can u suggest any way through which i can do the same.
January 22nd, 2013, 11:36 AM
You could calculate how much space the row that you are deleting is taking up but SQL server doesn't actually release memory that way. When you delete a row, it creates a space in the database that may or may not be filled up later on when you insert another row.
Originally Posted by abhisheksinghbi
How if fills up the log file depends on what recovery model you are using. If you are using simple, as soon as the transaction is complete, it is removed from the transaction log file with the exception of the LSN [Log Sequence Number]. Also, this depends on what version of SQL you are using. SQL 2005+ handles this differently than SQL 2000
I agree with gk53, the question doesn't make a whole lot of sense