Results 1 to 8 of 8
  1. #1
    TOPSie is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2021
    Posts
    153

    Compacting solves performance issue but.......

    I support a database for a distribution company - two identical accdb PCs and a backend mdb.
    Each evening when the vans return the customer payments are processed.
    A screen with a list box of customers with an outstanding balance - populated with a fairly simple SQL join is presented. The paying customer is selected from the list and the payment recorded.
    The the next customer is selected (after the listbox is refreshed) and so on for all paying customers.



    If the database is "fresh" the process is very quick, however as time goes on it gets slower and slower.
    If the whole system is shut down and the backend is compacted then all is quick again.

    But this is operationally undesirable. Is there any "garbage collect" or "refresh" facility to get things moving quicker without a full compact??

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,941
    Not clear of your setup? Sounds like you have two users but is the app split? Tables only in the back end, everything else in the front end. The back end located on a server and a copy of the front end on each users machine.

    Other thoughts- are tables normalised and properly indexed?

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    Look to see how much the BE size is each day.
    I had to import data from a spreadsheet each day when I worked in a bank and it caused bloat a lot. That is just a by product of how Access works.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    You could try to setup a compacting schedule at night when the files are not in use, here is a link to my free utility that can be scheduled to run by the built in Windows task scheduler.
    https://forestbyte.com/ms-access-uti...end-compacter/
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    TOPSie is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2021
    Posts
    153
    Quote Originally Posted by Gicu View Post
    You could try to setup a compacting schedule at night when the files are not in use, here is a link to my free utility that can be scheduled to run by the built in Windows task scheduler.
    https://forestbyte.com/ms-access-uti...end-compacter/
    Cheers,
    The (backend) db is compacted each night. In operation it does not grow very much (less than 5% in a day).
    The issue is that some processes (e.g. recording incoming payments) get slower and slower VERY QUICKLY, e.g. after doing 20 or so transactions. It is impractical to do a full compact every 20 minutes.
    This seems to be a recent turn of events - though other similar transactions exhibit this behaviour - its just that the other operator doesn't complain as much.

    In other systems there are things like garbage collection and cache clearing - does Access have anything like this???

  6. #6
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,159
    Does the front end size change dramatically during this operation?

    I noticed a problem with a clients system, where a temporary table was being used to speed up a complicated series of manipulations.
    It had inadvertently included a logo image as one of the fields, and was pulling in 25000 records which meant it grew alarmingly, and eventually ground to halt.

    Have you double checked you are explicitly closing all the objects, and setting them to nothing when the process is finished?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    In other systems there are things like garbage collection and cache clearing - does Access have anything like this???
    In Access that is Compacting.

  8. #8
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    IIRC, from what I've read there is such a thing and it happens in the background. It's why some people think you don't need clean up by setting object variables to Nothing in code. I would not follow that practice, preferring to be sure memory is released by cleaning up.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-16-2012, 08:26 AM
  2. Compacting and Repairing the database
    By rohnds in forum Programming
    Replies: 0
    Last Post: 07-27-2010, 02:52 AM
  3. db compacting
    By aiken_Bob in forum Access
    Replies: 5
    Last Post: 06-25-2010, 01:22 AM
  4. Compacting When Closing?
    By Sean04 in forum Access
    Replies: 5
    Last Post: 03-19-2010, 01:16 PM
  5. Compacting MS Access
    By ksenthilbabu in forum Access
    Replies: 4
    Last Post: 08-20-2009, 04:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums