#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    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...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    103
    Rep Power
    9
    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...
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    Clarification


    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.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by abhisheksinghbi
    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.
    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.

    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

IMN logo majestic logo threadwatch logo seochat tools logo