UNDERSTAND why access increase your dimension...

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

UNDERSTAND why access increase your dimension...

Post by sal21 »

I delete 34.xxx records dimension od mdb file 658mb
i reinsert the same number of records dimension od mdb file 963mb...

Ohhhhhhhhhhhhhhh same number deleted same number of records insertted increase approx 310mb????

note:
i use vb 6.0 and jet4 conn and sample delete sql query

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: UNDERSTAND why access increase your dimension...

Post by HansV »

Access does not automatically release unused space in the database, and even deleting records takes space (to be able to undo the delete, for example).
That's why you should compact and repair an Access database from time to time. This will force Access to rebuild all the table indexes and to remove unused space. You'll find that this reduces the file size, improves performance, and keeps the database healthy.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: UNDERSTAND why access increase your dimension...

Post by sal21 »

HansV wrote:Access does not automatically release unused space in the database, and even deleting records takes space (to be able to undo the delete, for example).
That's why you should compact and repair an Access database from time to time. This will force Access to rebuild all the table indexes and to remove unused space. You'll find that this reduces the file size, improves performance, and keeps the database healthy.
ok... but to not increase dimension of mdb, one of my friend, suggest me to to chek with a state controll all recordsert opened and close recordset opened to the end of code, or not?

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: UNDERSTAND why access increase your dimension...

Post by HansV »

Closing recordsets when you don't need them any longer is certainly a good idea, but it won't prevent the size of the database from increasing. An Access database will always grow in size over time when it is in use. Compacting it will reduce the size again.
Best wishes,
Hans

Mark L
3StarLounger
Posts: 331
Joined: 11 Feb 2010, 03:55
Location: Land O Lakes, FL

Re: UNDERSTAND why access increase your dimension...

Post by Mark L »

BTW, is this a single database or a frontend/backend situation? If a single database (not recommended), it will tend to bloat faster.
Mark Liquorman
Land O Lakes, FL
see my website http://www.liquorman.net for Access Tips and Tricks, and for my Liquorman Utilities.

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: UNDERSTAND why access increase your dimension...

Post by HansV »

Sal uses the database as a backend only. His frontend is a VB6 application.
But he continually imports, processes and deletes large numbers of records. This is bound to increase the size of the database.
Best wishes,
Hans