Ok, here is another one. Although I’m not really sure it is cause by Access itself.
One of my clients is a software house, and they just released a new version of their software, installing it at several sites for final testing before the general release. At one site, they ran into 2 bad problems:
– The backend MDB file experienced regular and severe bloating, going from 55MB to 2GB in a matter of hours!
– One particular form was taking a loooong(!) time loading; although sometimes fairly quickly, other times it took seemingly forever.
The backend MDB is sitting on a Windows 2003 server. All users were using Access2003; but some were local to the server, while others came into the server via Remote Desktop. Everyone had own copy of FE. As best as we could determine, everything had latest versions and patches.
In the database, there was already a Persons table and an Activities table, and the new version added an Experience table. For a small subset of all Persons (some 40 out of 7000), there was 1 record in the Experience table for each Activity (a classic “resolver” table to handle a many-to-many situation).
The form in question was doing a “just-in-case” adding of activity records to the resolver table (since there were several ways new Activities could be added), relying on the Unique Key of PersonID and ActivityID to keep duplicates out of the table. Apparently it was this query that was causing all the problems! For some reason it was causing Access to try to get more space, and the process of getting this space delayed the form from opening.
Here is what I have surmised. The query basically determined there were some 12,000+ records that would be added to the Experience table (each of 40 persons and some 300+ activities). Access basically then went out to get enough room to add all these records. Only after getting the space and actually trying to add the records did Access realize that not all the records would be added. But the space had already been asked for and allocated; and this happened each time the someone opened this form and the query ran.
I have a vague recollection of how Access allocates space. I believe starting in Access97, Access no longer just added all new records to the last sector in the file (this often caused a contention problem). When new space is allocated, it essentially includes a buffer area to allow for future records being added to these areas rather than always at the end.
So it appears that new space was constantly being asked for, but then never used! And apparently Access didn’t know it, which is why it kept asking for more. Now, I don’t know if it merely Access2003, or the combination of Access2003 with Windows Server and/or with the use of Remote Desktop.
Anyway, I rewrote the query to only add records not already in the Experience table, and we haven’t had any more problems with bloating or performance.
So, this is just something else you can keep in the back of your mind!