Disksapce of new database

Thomas Flemming tf at ttqv.com
Wed Oct 28 06:44:48 CDT 2009


Hi Ruslan ,

>> I just wrote a small routine to convert old Access-MDBs to Valentina-VDBs.
>> I'm doing this quit simple, just looping through all tables and fields in the
>> access-mdb and creating the respective tables and fields in a new
>> Valentina-vdb.
>>
>> Everything works fine, but I'm really surprised about the filesize of the
>> resulting VDB. Its huge!
>>
>> For example I have a access-mdb with 5 Table and 89 fields each. It is 500KB
>> on disc.
>> The newly created vdb, same structure, has 20MegaBytes !! Not even with data
>> in.
>>
>> But when I zip the new vdb, it is only 70KB left, so the 20MB is mostly empty
>> space.
>>
>> Is this normal? Even a compress in VStudio doesnt change the size.
> 
> Yes, this is normal.
> 
> Valentina engine pre-allocates one disk segment for each internal logical
> file.
> 
> Segment is 4Kb.
> 
> This is not many yet. MS SQL Server use 32Kb segments.
> 
> Note, that this empty db will be compressed by ZIP to few Kb, only,
> Because it is zeroed mainly.
> 
> 
> IF you need work with tiny dbs, then you can set smaller SegmentSize in the
>     db.Create()
> 

yes, thats it. I converted the same db again with SegmentSize =512kb and now 
the vdb is only 750kb instead of 20MB!
How does the SegmentSize affects the speed of reading, changing and adding new 
data?

Regards,
Tom






> 

-- 
/****************************************
**   Dipl.-Ing. Thomas Flemming
**   Software Development
**
**   Touratech AG
**   Auf dem Zimmermann 7-9
**   D-78078 Niedereschach
**
**   mail  tf at ttqv.com
**   fon   +49 (0) 7728 9279-206
**   fax   +49 (0) 7728 9279-29
**
**   http://www.ttqv.com
**   http://www.touratech.de
**
**   ... und immer dem Pfeil nach!
***************************************/


More information about the Valentina mailing list