If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Compact an Individual Table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-25-09, 09:50
MarkWhyte MarkWhyte is offline
Registered User
 
Join Date: May 2005
Posts: 99
Question Compact an Individual Table

Hi , I'm using Access 2003,

Q. I was wondering is it possible to compact an individual table within a database?

Reason for asking, I need to bring into a Data store table circa 250K records at a time, on different products we sell

Basic procedure is:

Upload product ‘A’ in to the Data Store tbl, various procedures take place and the resulting outputs are stored in a temp table for product ‘A’.

The data held in the Data Store tbl is then deleted; the procedure is repeated for the remaining products.

My issue is the database can grow considerably in size, so I was wondering if you can compact the Data Store tbl, on each loop of the products, to keep the database size down.

Thanks
Reply With Quote
  #2 (permalink)  
Old 02-25-09, 12:43
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 10,595
IM not aware of being able to selectively comapct and repair a table, tios either all or nothing.

I suspect your problem is the creation fo temp tabels, deleting rows then adding rows in the master product table.

is their not a better algolrhtym, which updates rows ars required, deletes and adds if update is not possible.

the alternative is tor run this as a batch process overnight and then rebuild your indexes before first use.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 02-25-09, 12:48
izyrider izyrider is offline
Cavalier King Charles
 
Join Date: Dec 2002
Location: Préverenges, Switzerland
Posts: 3,731
a crazy workaround: use an external temporary .mdb just for this table. from VBA you can CreateDatabase, CREATE TABLE, link to a table, DROP the linked table, kill the temporary .mdb

is delete the "ultimate compact" ?

izy
__________________
currently using SS 2008R2
Reply With Quote
  #4 (permalink)  
Old 02-26-09, 04:09
MarkWhyte MarkWhyte is offline
Registered User
 
Join Date: May 2005
Posts: 99
Thank you for the advice guy's,
Reply With Quote
  #5 (permalink)  
Old 02-26-09, 04:19
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,907
Quote:
Originally Posted by MarkWhyte
I need to bring into a Data store table circa 250K records at a time, on different products we sell
Have you done some trend analysis to see when you will likely hit Access (JET's) limit of 2GB? Quarter million rows imported at a time (and of course the width of the row is also a consideration) is really heading towards (and possibly exceeding) JET's capabilities.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On