473,750 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exuberant database file size increase

Hi

I have a typical front end/back end access app. Additionally a vb.net app
accesses the backend mdb file every few minutes and runs insert and update
queries on some table. The data to be inserted and updated is coming from a
remote db. The mdb file size is normally around 80MB but since running the
vb.net app the mdb file size grows to 1GB or so every few days. After
compact and repair the size does get back to 80MB but it is still a pain to
have to compact repair every few days. What is causing this massive file
size increase and is there any way to control it?

Thanks

Regards
Jan 3 '07 #1
5 4058
The action queries are causing the size increase. Access may not release the
previously used space until you compact the database.

The most obvious alternatives are to ensure the INSERT and UPDATE queries
don't make any unnecessary changes. For example, instead of:
UPDATE MyTable SET IsPicked = False;
there would be fewer updates if you used:
UPDATE MyTable SET Field1 = False WHERE IsPicked = True;

Similarly, if you are relying on a unique index to weed out duplicates when
you run your INSERT, use a WHERE clause so there are fewer attempts.

Other alternatives might include using the command line switch for
msaccess.exe to compact the database. Or you might create an mdb file with
the right structure but no data, and have it available as a template. Your
vb.net code could then copy the file, populate it, delete the old one, and
rename the new one so that it takes its place.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John" <Jo**@nospam.in fovis.co.ukwrot e in message
news:%2******** *******@TK2MSFT NGP04.phx.gbl.. .
>
I have a typical front end/back end access app. Additionally a vb.net app
accesses the backend mdb file every few minutes and runs insert and update
queries on some table. The data to be inserted and updated is coming from
a remote db. The mdb file size is normally around 80MB but since running
the vb.net app the mdb file size grows to 1GB or so every few days. After
compact and repair the size does get back to 80MB but it is still a pain
to have to compact repair every few days. What is causing this massive
file size increase and is there any way to control it?

Thanks

Regards
Jan 3 '07 #2
Hi, John.
What is causing this massive file size increase
Most likely it's the many updates. If the new data doesn't fit into the space
currently allotted for the record, Jet has to make room for it. If there isn't
enough room in the current data page, then the current data page is split in
two, and the records distributed to each half accordingly. Now there's room in
one of the data pages for this new data in this record, but instead of one 4 KB
data page (for Jet 4.0), you now have two 4 KB data pages. Even if the data
pages aren't full (and even when there are no records in it), each data page is
4 KB. (Exception: Jet 2.0, 3.0, and 3.5 use 2 KB data pages to store data,
because they don't accommodate Unicode characters, like Jet 4.0 does.)
is there any way to control it?
Compact it more often.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.
"John" <Jo**@nospam.in fovis.co.ukwrot e in message
news:%2******** *******@TK2MSFT NGP04.phx.gbl.. .
Hi

I have a typical front end/back end access app. Additionally a vb.net app
accesses the backend mdb file every few minutes and runs insert and update
queries on some table. The data to be inserted and updated is coming from a
remote db. The mdb file size is normally around 80MB but since running the
vb.net app the mdb file size grows to 1GB or so every few days. After compact
and repair the size does get back to 80MB but it is still a pain to have to
compact repair every few days. What is causing this massive file size increase
and is there any way to control it?

Thanks

Regards

Jan 3 '07 #3
The mdb file is used by several users during the day. At night I can try to
compact automatically. Is there any way to find out if no other user apart
from me is using the db is using the db so I can compact it safely?

Thanks

Regards

"Allen Browne" <Al*********@Se eSig.Invalidwro te in message
news:45******** **************@ per-qv1-newsreader-01.iinet.net.au ...
The action queries are causing the size increase. Access may not release
the previously used space until you compact the database.

The most obvious alternatives are to ensure the INSERT and UPDATE queries
don't make any unnecessary changes. For example, instead of:
UPDATE MyTable SET IsPicked = False;
there would be fewer updates if you used:
UPDATE MyTable SET Field1 = False WHERE IsPicked = True;

Similarly, if you are relying on a unique index to weed out duplicates
when you run your INSERT, use a WHERE clause so there are fewer attempts.

Other alternatives might include using the command line switch for
msaccess.exe to compact the database. Or you might create an mdb file with
the right structure but no data, and have it available as a template. Your
vb.net code could then copy the file, populate it, delete the old one, and
rename the new one so that it takes its place.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John" <Jo**@nospam.in fovis.co.ukwrot e in message
news:%2******** *******@TK2MSFT NGP04.phx.gbl.. .
>>
I have a typical front end/back end access app. Additionally a vb.net app
accesses the backend mdb file every few minutes and runs insert and
update queries on some table. The data to be inserted and updated is
coming from a remote db. The mdb file size is normally around 80MB but
since running the vb.net app the mdb file size grows to 1GB or so every
few days. After compact and repair the size does get back to 80MB but it
is still a pain to have to compact repair every few days. What is causing
this massive file size increase and is there any way to control it?

Thanks

Regards

Jan 3 '07 #4
Hi, John.
Is there any way to find out if no other user apart from me is using the db is
using the db so I can compact it safely?
The LDB Viewer will show all of the users currently in the database. You may
find a link to the LDB Viewer and other free diagnostic tools in the "Free
Microsoft Access Troubleshooting Tools" section on this Web page:

http://www.Access.QBuilt.com/html/links.html

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.
"'69 Camaro" <Fo************ **************@ Spameater.orgZE RO_SPAMwrote in
message news:Op******** ******@TK2MSFTN GP03.phx.gbl...
Hi, John.
>What is causing this massive file size increase

Most likely it's the many updates. If the new data doesn't fit into the space
currently allotted for the record, Jet has to make room for it. If there
isn't enough room in the current data page, then the current data page is
split in two, and the records distributed to each half accordingly. Now
there's room in one of the data pages for this new data in this record, but
instead of one 4 KB data page (for Jet 4.0), you now have two 4 KB data pages.
Even if the data pages aren't full (and even when there are no records in it),
each data page is 4 KB. (Exception: Jet 2.0, 3.0, and 3.5 use 2 KB data
pages to store data, because they don't accommodate Unicode characters, like
Jet 4.0 does.)
>is there any way to control it?

Compact it more often.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.
"John" <Jo**@nospam.in fovis.co.ukwrot e in message
news:%2******** *******@TK2MSFT NGP04.phx.gbl.. .
>Hi

I have a typical front end/back end access app. Additionally a vb.net app
accesses the backend mdb file every few minutes and runs insert and update
queries on some table. The data to be inserted and updated is coming from a
remote db. The mdb file size is normally around 80MB but since running the
vb.net app the mdb file size grows to 1GB or so every few days. After compact
and repair the size does get back to 80MB but it is still a pain to have to
compact repair every few days. What is causing this massive file size
increase and is there any way to control it?

Thanks

Regards


Jan 3 '07 #5
John wrote:
The mdb file is used by several users during the day. At night I can try to
compact automatically. Is there any way to find out if no other user apart
from me is using the db is using the db so I can compact it safely?
I have used the code at

http://www.ffdba.com/downloads/Compa...ked_Tables.htm

successfully in the somehat distant past.

I believe some may have reported that it did not operate successfully
for them. The function CanBeOpenedExcl usively may be helpful in
ascertaining whether or not the compact can be done.

If this were my db I would want to examine the .Net procedures that
added and modified data. The bloat you describe may be related to how
they do their job.

Jan 3 '07 #6

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

Similar topics

19
21223
by: dchow | last post by:
Our database size is currently 4G and is incrementing at a rate of 45M/day. What is the max size of a SQL database? And what is the size beyond which the server performance will start to go down?
2
1638
by: David | last post by:
Hello, I have several applications that maintain a Jet database via ODBC. There are perhaps two dozen tables, ony two of which have perhaps 10,000 records each. The rest are rather small. A typical MDB file runs between 1 and 4 MB. They can be Access 97 or Access 2000 format. The applications have been around for years. The DAO methods are used to access the tables. During start up the Jet interfaces are used to verify the...
30
3418
by: Wes | last post by:
On a nightly basis, we shut the database down and do a file system backup. A short chronology of our database problem: 8/21 - count(*) of user tables succeeded (done once a week to get statistics) 8/23 - A specific search on a specific value (one out of over 2 million) caused postmaster to SEGV. I dropped the index in question and rebuilt it. All appeared ok.
2
3110
by: Mike | last post by:
I running MySQL locally and have the following dir setup C:\wamp\mysql\data\mike - This is where the tables for the database mike are stored C:\wamp\mysql\data - This is where I think the database data is stored. Basically the file in the data dir. (ibdata1) is 10,240kb in size. When I update a table in the mike database the file size of ibdata1 doesn't increase and I don't know why?
9
5210
by: Adi | last post by:
Hello eveyone, I wanna ask a very simple question here (as it was quite disturbing me for a long time.) My problem is to read a file line by line. I've tried following implementations but still facing problems: Assume that FILE* filePointer; unsigned char lineBuffer;
3
2023
by: Limunski Magarac | last post by:
Hi all :) My apologies if I posted in the wrong groups, but I just jumped in MS SQL waters, so any guidance will be appreciated. What I'm trying to do is the following process: present operator with a web page (script) once filled with db name and username, script will create ..sql file
6
2145
by: sandyboy | last post by:
Hi, Please help me to solve this problem. My database size is 8 GB , 5GB of data file and 3GB of log file. I increased the size of datafile to 10GB and log file to 3.5 GB with 11GB and 4GB by 20 MB autogrowth. After increasing i checked the data file using sp_spaceused and it was 10 GB.But after 30-45 minutes, when i check the database size, it has reduced to 5GB and 3GB. But the autogrowth is 11GB and 4GB.I am not able to increase the...
1
4634
by: nagmvs | last post by:
Hello I am unable to upload More than 200kb in to my server and also i can downlaod only less than 4MB file from my server .When i am searching in internet i found solution as u can increase size of Metabase.xml (In IIS) file up to 1GB. Suppose if i increase size of Metabase.xml file up to 200 MB.is there any problems i can face for other applications ? Why microsoft predefined the size of Metabase.xml file as 4MB ? ...
0
4431
by: dot.yet | last post by:
Hi Everyone, environment: DB2 9.5 WSE with FP 2a Solaris 10 u5 - 64-bit SMP - 2 Quad CPUS - total 8 cores 16 GB RAM SAMPLE database Solaris Containers
0
9001
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9583
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9396
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9256
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6808
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4888
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.