import sys, os
mdb = sys.argv[-1]
out = os.popen('mdb-tables -S -1 '+mdb)
tables = out.read().split('\n')[:-1]
s = ''
for table in tables:
#print table
s += table+'\n'
out = os.popen('mdb-export %s "%s"'%(mdb,table))
s += out.read()+'\n'
print s
it seems quite clear that the mdb jet 4 format is grossly inefficient for small databases. this snippet spits out some csv text which is about 13kB, compared to the original mdb that weighs in at 430kB. grokking around the mdb confirms that almost all of it is 0s (fortunately easy to see, since i understand the jet standard does not require allocated file space to be wiped clean).
No comments:
Post a Comment