Subject | RE: [ib-support] GDB Size |
---|---|
Author | Leyne, Sean |
Post date | 2001-02-10T03:58:09Z |
Robert,
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
records.
Hope this helps.
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
records.
Hope this helps.
Sean
> -----Original Message-----
> From: Robert F. Tulloch [mailto:tultalk@...]
> Sent: Friday, February 09, 2001 8:42 PM
> To: ib-support@yahoogroups.com
> Subject: [ib-support] GDB Size
>
>
> Hi:
>
> I had gdb ~ 6mb. I added table:
>
> Table ALLZIP with fields:
>
> CITY VARCHAR(50)
> STATE CHAR(2)
> ZIP CHAR(6)
>
>
> I set up dialect 1 database with one table ALLSTATE with
> three fields:
>
> UCITY VARCHAR(50)
> USTATE CHAR(2)
> UZIP CHAR(6)
>
> 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
> http://click.egroups.com/1/11231/0/_/_/_/981768615/
> --------------------------------------------------------------
> -------_->
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>