Results 1 to 3 of 3
  1. #1
    chrisleng is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    19

    Dreaded database bloat - Append queries that bounce off indexes?

    A couple of projects recently I've used a unique index to save having to do outer joins to only append new records (based on an IS NULL for example) it's quicker just to throw all the records at the table and let the index bounce 99.9% of them and only add any new ones,



    However this seems to cause massive DB size bloat as this code is run regularly and each cycle is a good few thousand records, I notice the autonumber does increment, is this a known issue?

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,158
    Assuming you are not using dbFailOnError, it will attempt to create the records, and fail. I would guess this will use up the autonumber ID's, it certainly does in SQL Serevr.
    I would have assumed it would be more efficient to create criteria or suitable joins to only insert the required records ?
    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 ↓↓

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    I have done this before as well because it's a lot simpler. However, I chose to run an actual query but you have to turn off warnings and ensure you have an error handler that will turn them back on. I can't recall if auto nums were generated, but I think not. That would be because as Minty says, .Execute method will roll back changes if it fails, but I couldn't have told you whether or not it uses autonumbers. But so what if it did? Those numbers are meaningless beyond uniquely identifying a record, and if you're concerned about them being contiguous, you're concerned about nothing. Unless you think this operation will cause you to soon exceed the auto number field size I wouldn't worry about it even if running the query generates numbers (but I don't think it will).
    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. Database Bloat on DAO CommitTrans by 400 kb/commit
    By angeleumbra in forum Programming
    Replies: 7
    Last Post: 06-09-2022, 11:17 AM
  2. Huge Database BE Bloat
    By Brice in forum Access
    Replies: 6
    Last Post: 12-07-2020, 08:18 AM
  3. Replies: 9
    Last Post: 07-11-2018, 07:50 AM
  4. Back end database bloat
    By vicsaccess in forum Access
    Replies: 6
    Last Post: 06-14-2016, 12:22 PM
  5. Replies: 8
    Last Post: 11-01-2013, 01:59 PM

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