V4MD: reducing file size
Andrew Sinning
andrew at learningware.com
Tue Jun 22 12:30:21 CDT 2004
Ruslan,
There must be something wrong with the structure of my database. Or
maybe I don't understand the nature of the .dat file.
I went back to my original db with all the unwanted entries in it. I
did a dump and loaddump in order to compress. Here's what I got:
the dump.txt (an XML file) : 12Mb
the .vdb: 77Kb
the .ind: 1,025Kb
the .dat: 4,673Kb
the .blb: 993
Then, I ran an number of SQLExecute("DELETE ....") queries, removing 90%
of the entries in the database. Now when I do a dump and loaddump I get
the following:
the dump.txt (an XML file) : ONLY 1.6Mb
the .vdb: 77Kb (same as before)
the .ind: 1,089Kb (actually bigger?)
the .dat: 4,673Kb (EXACTLY the same as before)
the .blb: 289Kb (much smaller that before, as expected)
Can you please help explain to me why the .dat file isn't getting any
smaller? What is this file for?
Thanks.
-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net]On Behalf Of Andrew Sinning
Sent: Tuesday, June 22, 2004 11:20 AM
To: Valentina Developers
Subject: RE: V4MD: reducing file size
>>Then you can make it smaller if you set db.segment size not 32KB
How do I do that with a LoadDump() ?
I see that for CreateDatabase, there is a segmentSize param:
CreateDatabase object me, string path, [integer Mode], [integer
SizeOfCluster]
But for LoadDump, there is no such param:
LoadDump object me, string pathDumpFile, string pathNewDb, integer
inKind
Thanks.
-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net]On Behalf Of Ruslan
Zasukhin
Sent: Tuesday, June 22, 2004 10:40 AM
To: valentina at lists.macserve.net
Subject: Re: V4MD: reducing file size
On 6/22/04 5:55 PM, "Andrew Sinning" <andrew at learningware.com> wrote:
Hi Andrew,
> 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?
XML Load -> remove ANY garbage.
If you have not many data, just 1.6MB
But db you get bigger,
Then you can make it smaller if you set db.segment size not 32KB
But 16 or 8KB
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list