MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 16th, 2013, 11:48 AM
abhisheksinghbi abhisheksinghbi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 2 abhisheksinghbi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 48 sec
Reputation 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...

Reply With Quote
  #2  
Old January 16th, 2013, 11:56 AM
gk53 gk53 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 71 gk53 User rank is Sergeant (500 - 2000 Reputation Level)gk53 User rank is Sergeant (500 - 2000 Reputation Level)gk53 User rank is Sergeant (500 - 2000 Reputation Level)gk53 User rank is Sergeant (500 - 2000 Reputation Level)gk53 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 28 m 25 sec
Reputation Power: 8
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...

Reply With Quote
  #3  
Old January 16th, 2013, 12:42 PM
abhisheksinghbi abhisheksinghbi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 2 abhisheksinghbi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 48 sec
Reputation 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.

Reply With Quote
  #4  
Old January 22nd, 2013, 11:36 AM
turbofish turbofish is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 3 turbofish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 33 sec
Reputation Power: 0
Quote:
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Calculation of memory released after Deletion

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap