Saved 10mb with reviewing a few queries, forms etc.

PNGBill

Win10 Office Pro 2016
Local time
Today, 15:30
Joined
Jul 15, 2008
Messages
2,269
Just replaced 2 Macros (small), 5 Forms, 5 Queries & 1 report with two Forms and 1 Report.
Couldn't believe how the database reduced by 10mb (Compact and repair before and after):)
 
Oh yes :) Regular compact & repair is recommended. It's gets rid of some of the junk/bloat.
 
I'd be pretty surprised if the objects themselves were that big. Did the forms or report that were deleted have any embedded images?
 
I'd be pretty surprised if the objects themselves were that big. Did the forms or report that were deleted have any embedded images?
No images.
Only Forms and Queries plus two macros. The one report remains but the query is now the source rather then separate.

It does sound a big saving. I may have deleted another couple of queries and macros that were sitting doing nothing but no images.
 
What version? Are you sure you compacted before? I have A2k front ends with easily over 100 forms/reports/queries that are under 10Mb. I have a 2007 accdb that has at least that many objects and is about 14Mb. I can't see any way the objects themselves were that big.
 
The 2000 database hovered around 361mb to 362 when compacted. Climbed to 368 when not compacted.
After the work completed this morning, it dropped to 348,800 and has climbed to 352,700.

I still have the copy I used to work on that is 348,804KB

Yesterday's backup is 360,172KB and I note copy 357,912KB but nothing close to 348mb

This has been my "goal in life" the last month or two to do a "garage sale" of unwanted queries, forms and macros by deleting - the odd :eek: - and replacing with VBA and smarter queries and forms.
Regular compacting and repairing but noting that came close to the drop experienced today.

We don't have images.

Can't explain otherwise unless two "tasks" were involved. This would mean adding 2 more Macros , 1 form, 2 reports and about 10 queries plus 1 temp table, if not mentioned earlier.

Could the temp table be the issue?

Maybe I didn't compact and repair between the two tasks done this morning but no way was a major table deleted, just the temp table.
 
Just compacted the backup from last night. reduced from 360,172 to 358,212KB.
My working copy is 348,804KB
Saving is as close to 10mb as you can get.

Must be my new found vba code skill:D
 
I bet some of your queries were Make Table queries? ;)
 
It can be costly if not used sparingly and especially if you have large datasets. It could cause bloating. I've noticed you like Temp tables :)
 
It can be costly if not used sparingly and especially if you have large datasets. It could cause bloating. I've noticed you like Temp tables :)
Temp tables allow you to use simpler queries.

They can collect data for say a Statement which requires a fair bit of manipulating of the data to arrive at the records needed to produce same.

They are on the Hit List and in time should be down to a few bare essentials, if there is such.
 
Oh don't worry, I know its uses :)

10Mb is quite a significant save though. Were your forms "huge" forms, i.e. lots of controls etc?
 
this is my understanding - each "record" you have is made up of fields. Each field is allocated a space by Access everytime you create a new record. Even if nothing is entered into the field is is allocated the space determined by how many chars you have allowed for it or the field type. eg - TEXT field - 50 chars by default. so - if you have say 100 fields, and 1000 records, it will require close to 5 meg in size. Once those fields are saved, if you are only using 10% of the chars reserved for it, when you compact and repair the database will reduce in size by 90%ish.

Therefore, good DB managment are essential - only allow enough chars for each field, if its a reg, allow 9 chars. Avoid setting max length text fields where possible and always compact and repair.

the more space you record requires, the faster your DB will grow in size.

d
 
Forms not very complicated as they were from the past where everything was "simple"
An old copy shows the temp table had 155,525 records.
AutoNumber, Date/Time, Text 16chrs, text 10chrs, plus 3 x Currency fields
Not giant but not that small either.

Wasn't even using the temp table. Really goes to show how a data base is just like the garden shed, gets full of junk if you are not careful.

The old copy.. I compacted and repaired. 351,796KB, deleted the temp table, compacted & repaired and 342,436KB
Saving 9,333KB - Here is the big saving.

Imagine how fast our databases would be if we could delete all our tables!:p
 

Users who are viewing this thread

Back
Top Bottom