0

Let's say I have database with a .MDF file of 100 GB and which is 80% full (80 GB used out of 100 GB available).

Within this database I have a table which contributes 40 GB to the .MDF file.

My questions are:

  1. If I delete 20 GB worth or records will my .MDF file stay the same in terms of size (100 GB)? Also, will it reflect to the free space on/inside the .mdf file, meaning it will indicate that the .mdf file is now 60% full?

  2. Over time, if I add back records to my table leading up to another 20 GB of data (on the same table), will my .MDF file stay the same at 100 GB? And will it reflect that I will be back at 80% capacity for my .mdf file (meaning I now am back to 20 gb free space on my .mdf file)?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Avias
  • 354
  • 1
  • 4
  • 14
  • You need to get and read [the SQL Server 2012 Internals book](http://blogs.msdn.com/b/microsoft_press/archive/2013/12/06/new-book-microsoft-sql-server-2012-internals.aspx) – marc_s Jan 14 '14 at 07:23
  • Thanks, I'm using 2005 though atm – Avias Jan 14 '14 at 07:27
  • There's also a 2005 edition of that book (which you'll find on Amazon or Barnes&Noble or wherever you buy your books) - and the basics of those mechanics don't change all that much – marc_s Jan 14 '14 at 07:29
  • 2
    basically, le mdf acts as a device. It will not shrink unless tyou specifically order it, and it will grow automatically if your allowed it in the file options. So : 1/ the size will stay the same, 2/ yes, it will not need to grow. – rudi bruchez Jan 14 '14 at 07:56
  • @rudibruchez use that comment as an answer and I'll tag it as the correct one lol – Avias Jan 14 '14 at 08:04

0 Answers0