473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

My db grew 8.2GB in two weeks BUT only 4MB of data added

I have a db that grew 8.2GB in one week and don't understand why.
There are three tables added to the db daily. I calculated the
spaceused by each of the three tables for a period of two weeks. The
tatal amount of data added to the db for the three daily tables over
the past two weeks was about 4MB yet the db grew approximately 8.2GB.
WHY?

Can someone please tell me what I should look at so that I can
understand what is going on?

Jul 23 '05 #1
4 1363
Hi

There are a lot of things that can cause the database to grow. Without
more details its hard to say what, here are a couple of things it could
be.

Is it your database or is it your transaction log that has grown? If
you have your database set to full recovery and you are not doing
transaction log backups that can cause a large amount of growth.

Another possibility, have you recently set up a maintenace plan or a
job that rebuilds some or all of your clustered indexes? If your
database is set to auto grow, it could have grown due to index
rebuilds. Do you have some large tables on your database?

Hope this helps

John
war_whee...@yahoo.com wrote:
I have a db that grew 8.2GB in one week and don't understand why.
There are three tables added to the db daily. I calculated the
spaceused by each of the three tables for a period of two weeks. The
tatal amount of data added to the db for the three daily tables over
the past two weeks was about 4MB yet the db grew approximately 8.2GB.
WHY?

Can someone please tell me what I should look at so that I can
understand what is going on?


Jul 23 '05 #2
At a guess, you have the database in full recovery mode and you are not
backing up the transaction log - in this case, the log will keep
growing. If you don't need transaction log backups, then you can set
the recovery mode to simple, and MSSQL will truncate (empty) the log
periodically. See "Selecting a Recovery Model" in Books Online for the
implications of using simple mode.

Note that truncating the log doesn't shrink the physical file - you can
use DBCC SHRINKFILE for that. See "Shrinking the Transaction Log" in
Books Online.

If this doesn't help, I suggest you post some more details - which
version of MSSQL, what size are the data and log files for the
database, have you tried DBCC SHRINKDATABASE and SHRINKFILE etc.

Simon

Jul 23 '05 #3
Simon and John thanks for both of your replies. Also in response to
both of your assumptions, I am running a 'Simple' recovery model. My
data file is 47,678,488,576 bytes or 47.6GB while my tlog file is
524,288,000 bytes or 524.2MB. Two weeks ago I started to monitor the
growth of the database. As I previously mentioned, we add three tables
to the database daily. The tatal size of all of the tables over a two
week period (3 tables x 10 days) is approximately 4MB.

Given these numbers, I don't understand how the db size could increase
8.2GB in a week. The reason that I say in a week is because two weeks
ago I tracked the size of the db file on a daily basis. The db was
39,403,651,072 or 39.4GB. I wasn't feeling well last week so I didn't
track the database growth for a week. I starting tracking the
databases growth again yesterday and noticed the 8.2GB difference from
a week ago.

On another note, I do understand your suggestion(s) of shrinking the db
or the db file. My issue though is how can a db grow 8.2GB when only
4MB of data is added. Remember last week the db size was unchanged
with approx. 2MB of additional data while this week the file has grown
8.2GB with the same addition of 2MB.

The db contains 515 tables, but most of the tables are the daily tables
which do not grow. Only the current day's daily tables grow and then
are used for historical reference. The core of the db contains approx.
38 tables which are mostly static. If there is change in the core
tables it is insignificate compared to the growth of the daily tables.

I know that we might not be able to figure out exactly what is
happening. I am only trying to gain a better understanding of the way
databases can grow. Perhaps each of the tables or a significate number
of them outgrow their allotted space and increased their reserved
space. This might account for the physical growth???

Going on the above assumption I reran the spaceused sp and did notice
an increase in the reserved space for the tables of two weeks ago. My
tracking only goes back two week, but if the increase is applied by
515 tables this may explain the anomaly.

Any thoughts?

Jul 23 '05 #4

<wa*********@yahoo.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Simon and John thanks for both of your replies. Also in response to
both of your assumptions, I am running a 'Simple' recovery model. My
data file is 47,678,488,576 bytes or 47.6GB while my tlog file is
524,288,000 bytes or 524.2MB. Two weeks ago I started to monitor the
growth of the database. As I previously mentioned, we add three tables
to the database daily. The tatal size of all of the tables over a two
week period (3 tables x 10 days) is approximately 4MB.

Given these numbers, I don't understand how the db size could increase
8.2GB in a week. The reason that I say in a week is because two weeks
ago I tracked the size of the db file on a daily basis. The db was
39,403,651,072 or 39.4GB. I wasn't feeling well last week so I didn't
track the database growth for a week. I starting tracking the
databases growth again yesterday and noticed the 8.2GB difference from
a week ago.

On another note, I do understand your suggestion(s) of shrinking the db
or the db file. My issue though is how can a db grow 8.2GB when only
4MB of data is added. Remember last week the db size was unchanged
with approx. 2MB of additional data while this week the file has grown
8.2GB with the same addition of 2MB.

The db contains 515 tables, but most of the tables are the daily tables
which do not grow. Only the current day's daily tables grow and then
are used for historical reference. The core of the db contains approx.
38 tables which are mostly static. If there is change in the core
tables it is insignificate compared to the growth of the daily tables.

I know that we might not be able to figure out exactly what is
happening. I am only trying to gain a better understanding of the way
databases can grow. Perhaps each of the tables or a significate number
of them outgrow their allotted space and increased their reserved
space. This might account for the physical growth???

Going on the above assumption I reran the spaceused sp and did notice
an increase in the reserved space for the tables of two weeks ago. My
tracking only goes back two week, but if the increase is applied by
515 tables this may explain the anomaly.

Any thoughts?


My best guess is that you have autogrow enabled (I don't believe you
mentioned if you do or not), and adding the small tables has resulted in it
kicking in, and increasing the file size by whatever percentage or absolute
size is set. If the database size seems to fluctuate up and down, that could
be because you also have autoshrink enabled.

If these options are set (note that autogrow is per file, but autoshrink is
per database), then you could set up a server-side trace on the
autogrow/autoshrink events to get an idea of when and how often they occur.
There's more information on how the options work here:

http://support.microsoft.com/default...b;en-us;315512

Simon
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
3
by: Soren Jorgensen | last post by:
Hi, Following code should give the number of weeks in years 1998-2010 for a Danish calendar (on a Danish box) GregorianCalendar cal = new GregorianCalendar(); for(int i = 1998; i < 2010; i++)...
10
by: Rigs | last post by:
Hi, I have a textbox with a Custom Validator that utilizes the OnServerValidate method for that textbox. This works fine, however the method only executes when data exists in that textbox after...
0
by: Pietje puk | last post by:
Hello, Since im quite new to ASP.NET i wanted to ask you folks what the best way is to create a WebForm for modifying 1 field from a record. The manipulation of this field can be done by using...
2
by: David | last post by:
Hi, I have an order processing system in which I have an OrderDate and a Completion Date I want to print the difference in Weeks and Days between the two dates, i.e. if the completion date is...
3
by: Matt | last post by:
Hi All, I have the following situation: I admin a metrics database that includes an attendance piece that collects hours worked. From this data I show overtime as any amount of hours over 40...
3
by: Libber39 | last post by:
Hi everyone, Have a query on how to calculate the amount of weeks and days contained in a number in an access query. ie: the difference in days between 2 dates amounts to 17 days. I want to now...
2
by: Bull | last post by:
Hi, Is there a code that converts a whole number to Years and Weeks only? Thanks, Bull
14
by: Tommy Jakobsen | last post by:
Hi. Is there a method in .NET that takes "year" as an argument and returns the total number of weeks in that year? For culture da-DK (Danish). Thanks in advance. Tommy.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.