Subject RE: [ib-support] GDB Size
Author Leyne, Sean

I have to start by saying that worrying about a 6Mb change in the size
of a database file is not something that I think should be a priority
for anybody. Given that you can buy a 40Gb for $200 CDN ($135 USD) we
are talking about a change that would cost 0.03 CDN.

But you do ask some valid questions, that I'm sure someone else might
also be thinking about, so here we go...

Before I start, I will point out that IB does not release disk space
once it has been allocated to a database file. The database keeps track
of available space and reuses the freed space as required. Only a
backup and restore will free up the unused file space.

(You didn't indicate whether you had any indexes on the table, so I will
assume there was only a primary key index on the ZIP field -- seems the
most logical choice).

1) What's minimum size of a database?

That depends on 2 things;

- the page size you use. The larger the page, the more disk space will
be "wasted" due to partially filled pages. Before you start making the
database page size 1024bytes (the smallest), realize that large page
sizes are very beneficial in larger database files. You also are more
likely to get better raw performance with larger pages sizes (it is
somewhat O/S and hardware dependent).

- the number of database elements/objects (tables, view, columns,
triggers, procedures, indexes and grants) defined in your database.

The absolute minimum database size is 230kb.

2) Why would the database grow by at least 4Mb when the dBase file
was only 1.8Mb?

The simple answer is that dBase doesn't have to worry about transaaction
management or data integrity. As well as tracking the actual data, the
database (any SQL server) needs to track data about the data --
information about each database page is actually stored in a system
table within the database.

3) Why would the database grow by 6Mb using the datapump vs 4Mb
using IB_WSQL?

The most important factor is whether the datapump starts/commits a new
transaction for each record or does the insert in one transaction. I
suspect that it's start a transaction for each record, hence, the larger
disk size..

The difference with IB_WSQL not the dialect 1 vs 3, but the again
related to how IB_WSQL start/commits transactions. Based on following
Jason postings over the years, I think it an extremely safe bet that all
the insert are being posted in a single transaction. Thus the database
does not need to keep track of back version of the primary index

Hope this helps.


> -----Original Message-----
> From: Robert F. Tulloch [mailto:tultalk@...]
> Sent: Friday, February 09, 2001 8:42 PM
> To:
> Subject: [ib-support] GDB Size
> Hi:
> I had gdb ~ 6mb. I added table:
> Table ALLZIP with fields:
> I set up dialect 1 database with one table ALLSTATE with
> three fields:
> I pumped the data into this from dBase table (46797
> records) with datapump.
> The dBase table was 1.8 mb. After datapumping the data
> into the dialect 1 gdb, that
> gdb was 12+ mb. I then used IB_WSQL to pump the data from the
> Dialect 1 to the Dialect
> 3 .gdb. It wnet from 6 mb to 10+ mb.
> 1. What is the minimum size of a gdb with no data (approximately)?
> 2. Why would data from dBase which only used 1.8 mb require
> so much more in IB?
> 3. Why would that same data that produced a 12 mb .gdb in
> Dialect 1 only increase
> size of Dialect 3 by ~ 4 mb?
> Any insight here appreciated.
> Best regards
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-~>
> eGroups is now Yahoo! Groups
> Click here for more details
> --------------------------------------------------------------
> -------_->
> To unsubscribe from this group, send an email to: