V4MD: reducing file size

Andrew Sinning andrew at learningware.com
Tue Jun 22 09:55:20 CDT 2004


I'm trying to figure out how to clean up the garbage in my database.

After deleting 80% of records, I Flush, Dump, CloseDatabase, and then
LoadDump, but the size of my database files (notably the .dat file) stay
the same.

  -- Flush
  dbConn.Flush()
  -- Dump
  dumpFile = dbFile&"_dump.txt"
  dbConn.Dump(dumpFile,2)
  -- close conn
  CloseDatabase(dbConn)
  -- delete existing files
  folder = GetContainingPath(dbFile)
  fileRoot = GetLastPathItem(dbFile)
  baDeleteXFiles(folder, fileRoot&".*" )
  -- create new
  dbConn.LoadDump(dumpFile,dbFile,2)
  -- connect
  dbConn.OpenDatabase(dbFile)

I have confirmed that I am actually deleting the existing files before
the LoadDump.

The size of the dumpFile is 1.6Mb, but the size of the .dat file is
4.7Mb.

What am I doing wrong?




More information about the Valentina mailing list