473,769 Members | 6,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File bloating/compression problem in Jet

I have a project that is using a Jet backend and having trouble with Jet's
tendency to bloat it's MDB file. I can compact it but it is a hassle. I am
considering switching to a Fox backend but have not used one. I want to
know:

1) Does the Foxpro backend also bloat like this?
2) Is it hard to distribute fox binaries if all you want is bare bones DBMS
stuff (I handle all the UI)?

RDeW

Nov 13 '05
12 2298
"Riley DeWiley" <ri***********@ gmail.com> wrote in
news:MP******** ************@se anet.com:
"David W. Fenton" <dX********@bwa y.net.invalid> wrote in message
news:Xn******** *************** ***********@24. 168.128.90...
"Larry Linson" <bo*****@localh ost.not> wrote in
news:nt3we.3418 $rE6.690@trnddc 06:
[]
It might help if you'd say what your front-end is, when you do. I am writing an embedded app with OleDB, C++ on Windows. The front
end is therefore all C++ code of my own creation.
Anyone having bloat problems probably has a design problem. I've
never seen unacceptable bloat in any MDB that:

1. was not corrupted in some way, OR
How can I detect this corruption, if this is the problem I am
having?


Well, the kind of corruption I was thinking of was in VBA code, but
if your MDB is being used by a C++ app, then there isn't any code in
it to corrupt.

You might try recreating the MDB in code and appending the data from
the original MDB. I don't know how you do that with C++ -- I only
know how to manipulate Jet via DAO.
2. was not being used in a way that unwisely added/deleted
bunches of records in the data file instead of in a temp file.


I am hitting the problem after doing a large number of inserts,
and only a few deletions, in three tables:
- A table with an Autonumber field and a text field, with up to
tens of thousands of records, indexed on the autonumber;
- A table with an Autonumber field and a text field, with up to
about two million records, indexed on the autonumber and the text;
- A junction table for the above, comprising exactly three 32 bit
integers (one is a count), with up to about four million records,
indexed on the two ID fields as a combined unique key.


That sounds like quite a bit of data to me, enough to make me
consider going to a non-Jet back end.
Referential integrity is enforced through the junction table;
every entry must have a corresponding entry in each of the other
tables.

Insertions are made as follows:
LOOP(500 times)
START TRANSACTION

if(entry exists in left table)
fetch left_id;
else
insert into left table and fetch left_id;

if(entry exists in right table)
fetch right_id;
else
insert into right table and fetch right_id;

if(exists record (left_id, right_id) in junction table)
update count field for that record with new count;
else
insert into junction table (left_id, right_id, count)

COMMIT TRANSACTION
END LOOP

When I am nowhere near "full", my DB reaches a state where it will
compact down twenty-fold, that is, from about 800 MB to about
40MB. If I baby it, compressing as I go, when it is "full" (tables
as above), it is about 700 MB and seems to work fine. A DB that
has grown to 5000 x 500,000 x 50,000 records can easily take up a
gigabyte. There are other tables in the DB but they do not have
many records, and are not as "busy" as these three by far.
Well, how often are you going to be inserting this amount of data?
If it's often enough that over the life of the file (say in 2 years)
you'll be bumping up against the 2GB limit on compacted size, then
I'd say Jet isn't a very good choice for your back end.

Another thing to try is to use a Jet 3.5 MDB file, instead of Jet 4
-- bloat in Jet 4 MDBs is an order of magnitude worse than in Jet
3.5, in my experience.
If I don't compact it all the time as I fill it, it goes over 2GB
and becomes irreparably corrupt.

Please expand upon design issues that can cause/avoid this
problem, and how I detect corruption. . . .
There isn't any way to really detect corruption of the kind of that
would be relevant to you. The only way to get around it is to create
a fresh Jet MDB (not with Access) and append the data from the
problem database and see if it exhibits the same problems.
. . . I cannot believe that what I
am seeing is "normal" for such a successful product as Jet, as it
renders the database nearly unusable. I hope to discover I am
doing something wrong.


Try the Jet 3.5 format instead of Jet 4.

And do all your MDB creation in code, not with Access itself.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #11

"David W. Fenton" <dX********@bwa y.net.invalid> wrote in message
news:Xn******** *************** ***********@216 .196.97.142...
"Riley DeWiley" <ri***********@ gmail.com> wrote in
news:MP******** ************@se anet.com:
"David W. Fenton" <dX********@bwa y.net.invalid> wrote in message
news:Xn******** *************** ***********@24. 168.128.90...
"Larry Linson" <bo*****@localh ost.not> wrote in
news:nt3we.3418 $rE6.690@trnddc 06:
[]
It might help if you'd say what your front-end is, when you do. I am writing an embedded app with OleDB, C++ on Windows. The front
end is therefore all C++ code of my own creation.
Anyone having bloat problems probably has a design problem. I've
never seen unacceptable bloat in any MDB that:

1. was not corrupted in some way, OR


How can I detect this corruption, if this is the problem I am
having?


Well, the kind of corruption I was thinking of was in VBA code, but
if your MDB is being used by a C++ app, then there isn't any code in
it to corrupt.

You might try recreating the MDB in code and appending the data from
the original MDB. I don't know how you do that with C++ -- I only
know how to manipulate Jet via DAO.
2. was not being used in a way that unwisely added/deleted
bunches of records in the data file instead of in a temp file.


I am hitting the problem after doing a large number of inserts,
and only a few deletions, in three tables:
- A table with an Autonumber field and a text field, with up to
tens of thousands of records, indexed on the autonumber;
- A table with an Autonumber field and a text field, with up to
about two million records, indexed on the autonumber and the text;
- A junction table for the above, comprising exactly three 32 bit
integers (one is a count), with up to about four million records,
indexed on the two ID fields as a combined unique key.


That sounds like quite a bit of data to me, enough to make me
consider going to a non-Jet back end.


I'm considering it, thanks.


Another thing to try is to use a Jet 3.5 MDB file, instead of Jet 4
-- bloat in Jet 4 MDBs is an order of magnitude worse than in Jet
3.5, in my experience.


Turning off record locking, a Jet 4.0 feature, has really helped.

Nov 13 '05 #12
"Riley DeWiley" <ri***********@ gmail.com> wrote in
news:Pu******** ************@se anet.com:
Turning off record locking, a Jet 4.0 feature, has really helped.


I've *always* turned off record-level locking in Access 2K, because
it just isn't needed except when you're using pessimistic locking,
which is something that very few applications actually need.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #13

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

Similar topics

8
8843
by: Dennis Hotson | last post by:
Hi, I'm trying to write a function that adds a file-like-object to a compressed tarfile... eg ".tar.gz" or ".tar.bz2" I've had a look at the tarfile module but the append mode doesn't support compressed tarfiles... :( Any thoughts on what I can do to get around this?
1
1847
by: Sanjay Asrani | last post by:
A test database that we used in one of our implementation pilots was abandoned around 4 months back. The database when abandoned had a log file size of less than 500MB. The log file has been steadily bloating (just came to my attention) and has reached 8.5GB. The database has not been used since abandoned 4 months back at 500MB. Considering the fact that our live DB has a combined (data + log) file size of less than 2GB I do not want to...
19
2718
by: jameso321 | last post by:
Hi, We run an MS Access 2000 DB with about 15 users. It is on a Win 2000 Server (SP4) machine and runs through Citrix Metaframe Presentation Server 3.0. --------------------------
4
18546
by: ad | last post by:
I want to send a DataSet to WebService, but the DataSet if too huge(there about 50000 records, and 50 fields every record). My solution is 1.save the DataSet as XML file, 2.zip the XML file. 3. send the zip file to WebService. 4. Unzip the zip file to XML. 5. Load XML file into DataSet. 6.Bulk copy the XML file to DataBase.
22
4009
by: petermichaux | last post by:
Hi, I'm curious about server load and download time if I use one big javascript file or break it into several smaller ones. Which is better? (Please think of this as the first time the scripts are downloaded so that browser caching is out of the equation.) Thanks, Peter
52
7540
by: paytam | last post by:
Hi all Can anyone tell me how can I check that a file exist or no.I mean when you use this commands FILE *fp; if(!fp) //Could not open the file doen't show why it can not open it,may be the file doesn't exist.Now tell me what should I do! Thanks
1
6509
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
3
5964
by: Sean Davis | last post by:
I have a set of numpy arrays which I would like to save to a gzip file. Here is an example without gzip: b=numpy.ones(1000000,dtype=numpy.uint8) a=numpy.zeros(1000000,dtype=numpy.uint8) fd = file('test.dat','wb') a.tofile(fd) b.tofile(fd) fd.close()
5
2768
by: swethak | last post by:
hi, i want to zip the folder using php. Any body plz help for that.
0
9424
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
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...
1
10000
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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
6675
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();...
1
3968
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
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.