V4MD: reducing file size
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Jun 22 20:37:29 CDT 2004
On 6/22/04 8:30 PM, "Andrew Sinning" <andrew at learningware.com> wrote:
> 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?
Easy.
1) .dat file contains records of table. So this is MAIN File.
2) Valentina keep each field in the separate logical internal file.
each file allocate disk space by segments.
so minimal allocation for a file is 32KB on default.
3) when you have NOT many data in your tables or even EMPTY tables,
Valentina still will pre-allocate that segment for each file.
in fact it is filled by ZEROs, so you may find that it can be compressed
with excellent rate! up to 95%
so if you worry about DOWNLOAD size of you archive, no problems,
compressed db will be small.
4) For dbs that have not many data, and in case developer VERY need/want get
small file size, you need set smaller segment size. You can set it even 2KB.
So you EMPTY db will become in 16 times less.
But if you have e.g. Empty db size 10MB, nut later you enter 100MB of data,
Then no need set segment small.
5) I have told already, on XML dump file change value of tag <segmentsize>
then make LOAD.
--
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
-------------------------------------------------------------
More information about the Valentina
mailing list