473,651 Members | 2,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB Bloat: Suspect Something To Do With I/O?

I *know* I've been here before some years back, but can't for the life of me
recall the details.

My application is growing from about five megs to over a hundred megs in the
course of a 6-8 hour batch run that performs something on the order of 1.2
million computations.

The back end also grows (from about 50 megs to a half gig), but I would expect
this and plan to compress it after the process.

What's bothering me is the app's growth.

- All tables are links to the back end and/or a work DB.
- I've stepped through the I/O code (and there isn't much of it) and it looks
like every time I open a recordset, I .Close it and set it = Nothing before
exiting the routine.
- Ditto query objects. Whenever do a Set myQuery=, it's balanced out by a Set
myQuery=Nothing .

The only suspicious thing I found is one routine where I Dim a recordset, then
..Close it and set it = Nothing in the exit routine (with no error trapping - so
it doesn't throw an error bc nothing's open)...but never use it in the routine.
It's a "Dead" object so-to-speak.
In the situation I dimly remember from years past, the DB was picking up about
4k every time I did *something*.... but I can't remember what...

Anybody?
--
PeteCresswell
Nov 13 '05 #1
13 1601
"(Pete Cresswell)" <x@y.z.invali d> wrote in
news:dn******** *************** *********@4ax.c om:
- I've stepped through the I/O code (and there isn't much of it)
and it looks like every time I open a recordset, I .Close it and
set it = Nothing before exiting the routine.
- Ditto query objects. Whenever do a Set myQuery=, it's balanced
out by a Set myQuery=Nothing .


Are you using QueryDefs? If so, I know that people say that if you
use temporary ones (no name), they don't bloat the db, but my
experience says that is not the case.

The other thing I might wonder about is if your recordsets are using
saved queries -- perhaps they are recompiling during the process?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #2
On Wed, 02 Mar 2005 02:17:27 GMT, "David W. Fenton"
<dX********@bwa y.net.invalid> wrote:
Are you using QueryDefs? If so, I know that people say that if you
use temporary ones (no name), they don't bloat the db, but my
experience says that is not the case.
I am using pre-defined queries, instantiating them, setting the parms,
and then opening a recordset based on same

The other thing I might wonder about is if your recordsets are using
saved queries -- perhaps they are recompiling during the process?


You went over my head on that one. As above, I'm basing recordsets
on pre-defined/saved/named queries. Sounds like maybe the app is
compiling the query on-the-fly?
Nov 13 '05 #3
PeteCresswell <x@y.z.Invali d> wrote in
news:sc******** *************** *********@4ax.c om:
On Wed, 02 Mar 2005 02:17:27 GMT, "David W. Fenton"
<dX********@bw ay.net.invalid> wrote:
Are you using QueryDefs? If so, I know that people say that if you
use temporary ones (no name), they don't bloat the db, but my
experience says that is not the case.


I am using pre-defined queries, instantiating them, setting the
parms, and then opening a recordset based on same


Then they are temporary querydefs that you're opening, since that's
the only way to assign values to parameters. In my experience, that
leads to bloat.
The other thing I might wonder about is if your recordsets are
using saved queries -- perhaps they are recompiling during the
process?


You went over my head on that one. As above, I'm basing
recordsets on pre-defined/saved/named queries. Sounds like maybe
the app is compiling the query on-the-fly?


I don't know when a saved query gets recompiled. I thought it was
only when the query was saved the first time after a compact.

I'm more inclined to suspect the querydef parameter assignment.

I don't use parameters in queries that are opened only in code.
Indeed, I generally don't use saved queries for opening recordsets
at all. What do you think you're getting by using parameter queries
that you wouldn't get with opening recordsets from SQL with a WHERE
clause constructed on-the-fly?

I have a vague feeling that parameters can speed things up (as the
data type of the input is known), but I can't come up with anything
that supports that.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #4
Per David W. Fenton:
What do you think you're getting by using parameter queries
that you wouldn't get with opening recordsets from SQL with a WHERE
clause constructed on-the-fly?


Mainly indulging a longstanding habit. I always preferred queries as a place
to stash SQL because I can put a label on it and it shows up in a list.
Embedded SQL, in my experience, lessens the maintainability of an app.

But I guess it's time to try a little change here. I wish I'd read your post
about four hours ago...before I kicked off that monster batch job to run
overnite.

Tomorrow, I'll change those few queries to inline SQL, rerun, and see if the
problem goes away.

Meanwhile, mabye I'll try a post in one of the MS Public NGS to see if I can
troll up somebody who knows the mechanism of the bloating effect.

Thanks.
--
PeteCresswell
Nov 13 '05 #5
"(Pete Cresswell)" <x@y.z.invali d> wrote in
news:dd******** *************** *********@4ax.c om:
Per David W. Fenton:
What do you think you're getting by using parameter queries
that you wouldn't get with opening recordsets from SQL with a
WHERE clause constructed on-the-fly?


Mainly indulging a longstanding habit. I always preferred
queries as a place to stash SQL because I can put a label on it
and it shows up in a list. Embedded SQL, in my experience, lessens
the maintainability of an app.

But I guess it's time to try a little change here. I wish I'd
read your post about four hours ago...before I kicked off that
monster batch job to run overnite.

Tomorrow, I'll change those few queries to inline SQL, rerun, and
see if the problem goes away.


Well, I think the main issue is the parameters, not that it's saved
SQL.

As to bloat, most people here have denied that opening non-saved
QueryDefs causes bloat, but I've seen it enough to have developed
the habit of avoiding them.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #6
Per David W. Fenton:
As to bloat, most people here have denied that opening non-saved
QueryDefs causes bloat, but I've seen it enough to have developed
the habit of avoiding them.


I just stumbled across
http://support.microsoft.com/default...;EN-US;q289562 which suggests
that a QueryDef needs to have the .Close method applied to it to prevent growth.

I've always closed RecordSets, but only set QueryDefs = Nothing.

Maybe this is the cause.... Got a little test harness running right now that
sets the QueryDef = Nothing but does not .Close it...
--
PeteCresswell
Nov 13 '05 #7
"(Pete Cresswell)" <x@y.z.invali d> wrote:
My application is growing from about five megs to over a hundred megs in the
course of a 6-8 hour batch run that performs something on the order of 1.2
million computations.


Also see the Bloating Front End (FE) Microsoft Access MDB/MDEs Tips page at my
website at http://www.granite.ab.ca/access/bloatfe.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #8
Per (Pete Cresswell):
Maybe this is the cause.... Got a little test harness running right now that
sets the QueryDef = Nothing but does not .Close it...


Nope. Got through a quater million reps of setting a local querydef to the
saved querydef, feeding it 3 parms, opening an RS based on it, closing the rs,
and just setting the query = Nothing. No increase in size at all.

Now I'm trying the same loop, but with a .Edit.....Updat e in it.
--
PeteCresswell
Nov 13 '05 #9
Per Tony Toews:

Also see the Bloating Front End (FE) Microsoft Access MDB/MDEs Tips page at my
website at http://www.granite.ab.ca/access/bloatfe.htm


Thinks....been there courtesy of Google earlier today.

Seems like I'm 100% in compliance so far.

My leading theory of the moment is that I'm lying about doing a .Close all the
time. Gotta get back to the client's site tonite or tomorrow and step through
the code very carefully....ma ybe I missed something the first time through -
under the influence of the "Hong Kong Lite" virus-or-whateverthell-it-is that I
managed to pick up Saturday nite...
--
PeteCresswell
Nov 13 '05 #10

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

Similar topics

5
4403
by: Salvador I. Ducros | last post by:
Greetings all, I was hoping someone might be able to point me in the right direction. I'm currently using std::vector to maintain several lists whose objects are of unrelated types (classes). I've seen mentioned here and there a technique that uses 'void *' and something called 'template specialization' that would reduce the amount of code generated for the
15
1348
by: tadpole | last post by:
Well, it's been a year since I jumped from C/C++ and ModPerl to Visual Studio 2003 and C#. Frankly, I'm disappointed with it. There are a lot of little annoying bugs with the IDE that just shouldn't have made it through rigorous testing. I'm sure some of what I think of as deal killing flaws in the IDE are features that have settings that I can change, but the environment is so clogged with excess baggage it's impractical to go...
6
3996
by: RainBow | last post by:
Greetings!! I introduced the so-called "thin-template" pattern for controlling the code bloat caused due to template usage. However, one of the functions in the template happens to be virtual as well. To support thin-template, I need to make virtual function as inline. Now, I know that compiler would generate an out-of-line copy when it
7
2707
by: Danny J. Lesandrini | last post by:
I know this has been discussed before, as I've seen the Google posts, but they all leave me with an unanswered question: Does my DAO code executed in the front end cause the back end to bloat? (May also substitute UPDATE and/or DELETE queries for DAO code.) I was just brought on to a project with Access 97 where the all data is kept on the server. It doubles in size each day, from 80 mb to 160 mb. The data file contains only tables...
8
1776
by: DFS | last post by:
One of my larger Access97 systems is now 12mb of code: queries, forms, reports, and modules (with a few tiny lookup tables). It also contains 45 links to an Access back-end, and 20 links to a SQL Server db Just today I replaced 16 subforms used for looking up data with 1 subform and a little code (ala David Fenton's LookupAdmin system). That helped a little, but it's still a sizeable program. Which objects take up the most space? Is...
11
4072
by: BillCo | last post by:
I'm using a backend that's been around for years before I joined the company. It kind of grew exponentially and has some design problems including large unused tables some temporary tables. It compacts to 150Mb, but after a day it's up to 300Mb and it gros steadily from there. I need to: (a) reduce the size (b) reduce the bloat factor Apart from moving the temporary tables to front end (which can't possibly account for all of the this...
5
6704
by: MLH | last post by:
I've read a number of posts over the years that dealt with the issue of database bloat. I'm wondering if anyone has determined exactly what information comprises the bloat when it does occur. Has anyone ever looked into that and arrived at a conclusion? Part-2 of the question is "Under what circumstances does MS Access database bloat occur and what can be done to circumvent it?"
48
2618
by: Tony | last post by:
How much bloat does the STL produce? Is it a good design wrt code bloat? Do implementations vary much? Tony
10
1755
by: mirandacascade | last post by:
Question toward the bottom of this post....background information immediately below. Access 97 SQL Server 2000 Please note: although the subject line uses the word 'bloat', this post is NOT a "what can I do to prevent bloat?" inquiry. When I searched the postings in this group for information about bloat, I believe I gained a rudimentary understanding of some of the things
0
8277
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,...
1
8465
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
8581
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...
0
7298
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...
0
5612
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
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
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
1
1910
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.