Subject GDB file grows
Author Trinidad Miravet Celades
Hi all,

I have a problem with a database that grows in a very strange way. In a
normal state the database file size is 17Mb. In normal conditions the
database grows approx. 30Mb in a whole year. In the actual state after
three days of working the size of the database grew from 17Mb to 150Mb.
After fixing and sweeping the database file size is again aprox. 17Mb,
but again in two or three days the size is 150Mb and keeps growing very
fast if you dont do a fix and sweep. Of course, that volume of data were
not inserted in the database, let's say that the database was inflated
but hollow inside.

I am almost sure that the origin of all this is a massive data deletion
-around 50000 records were deleted from one table-. But it is supposed
that if after a massive data deletion you do a sweep of the database
everything should be ok, isn't?

The only way I have found to get back to a normal situation is create a
new database, migrate the data to the new database and then everything
is ok.

If anyone could help me to confirm if the deletion is really the caused
of this or how could I avoid this situation, I would appreciate too much.

The result of gstat after the sweep is attached.

I can attach too a gbak of the database is necessary.

I am using Firebird 1.5

Thanks for your help,

Trini.



----------


Database "grader.gdb"

Database header page information:
Flags 0
Checksum 12345
Generation 28
Page size 4096
ODS version 10.1
Oldest transaction 19
Oldest active 2
Oldest snapshot 1
Next transaction 21
Bumped transaction 1
Sequence number 0
Next attachment ID 0
Implementation ID 16
Shadow count 0
Page buffers 0
Next header page 0
Database dialect 3
Creation date Aug 13, 2007 15:58:57
Attributes force write

Variable header data:
Sweep interval: 20000
*END*


Database file sequence:
File grader.gdb is the only file

Database log page information:
Creation date
Log flags: 2
No write ahead log

Next log page: 0

Variable log data:
Control Point 1:
File name:
Partition offset: 0 Seqno: 0 Offset: 0
Control Point 2:
File name:
Partition offset: 0 Seqno: 0 Offset: 0
Current File:
File name:
Partition offset: 0 Seqno: 0 Offset: 0
*END*

Analyzing database pages ...

ALARMS (128)
Primary pointer page: 150, Index root page: 151
Data pages: 4, data page slots: 4, average fill: 54%
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 4
60 - 79% = 0
80 - 99% = 0

Index PKALARMS (0)
Depth: 1, leaf buckets: 1, nodes: 321
Average data length: 1.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 1
60 - 79% = 0
80 - 99% = 0

CARGAS (129)
Primary pointer page: 152, Index root page: 153
Data pages: 137, data page slots: 137, average fill: 79%
Fill distribution:
0 - 19% = 0
20 - 39% = 2
40 - 59% = 18
60 - 79% = 42
80 - 99% = 75

Index PKCARGAS (0)
Depth: 1, leaf buckets: 1, nodes: 434
Average data length: 1.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 0
60 - 79% = 1
80 - 99% = 0

DESCARGAS (130)
Primary pointer page: 154, Index root page: 155
Data pages: 3111, data page slots: 3111, average fill: 86%
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 3111

Index FKDESCARGASMAT (1)
Depth: 2, leaf buckets: 103, nodes: 68882
Average data length: 0.00, total dup: 68877, max dup: 50463
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 102

Index PKDESCARGAS (0)
Depth: 2, leaf buckets: 120, nodes: 68882
Average data length: 1.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 0
20 - 39% = 1
40 - 59% = 0
60 - 79% = 0
80 - 99% = 119

ENCENDIDO (131)
Primary pointer page: 156, Index root page: 157
Data pages: 1, data page slots: 1, average fill: 1%
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0

FESTIVOS (138)
Primary pointer page: 171, Index root page: 172
Data pages: 5, data page slots: 5, average fill: 52%
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 5
60 - 79% = 0
80 - 99% = 0

INGRCARGA (133)
Primary pointer page: 160, Index root page: 161
Data pages: 46, data page slots: 46, average fill: 59%
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 26
60 - 79% = 19
80 - 99% = 0

Index FKINGRCARGAMAT (1)
Depth: 2, leaf buckets: 5, nodes: 2982
Average data length: 0.00, total dup: 2976, max dup: 851
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 1
60 - 79% = 0
80 - 99% = 4

Index FKINGRCARGANUM (2)
Depth: 2, leaf buckets: 5, nodes: 2982
Average data length: 0.00, total dup: 2556, max dup: 6
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 1
60 - 79% = 0
80 - 99% = 4

Index PKINGRCARGA (0)
Depth: 2, leaf buckets: 6, nodes: 2982
Average data length: 1.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 0
60 - 79% = 1
80 - 99% = 5

LOG_ALARM (134)
Primary pointer page: 163, Index root page: 164
Data pages: 77, data page slots: 77, average fill: 78%
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 1
60 - 79% = 71
80 - 99% = 5

Index PKLOG_ALARM (0)
Depth: 2, leaf buckets: 5, nodes: 2773
Average data length: 1.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 0
60 - 79% = 1
80 - 99% = 4

MAINTCOUNT (132)
Primary pointer page: 158, Index root page: 159
Data pages: 2, data page slots: 2, average fill: 35%
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 1
80 - 99% = 0

MATERIAS (135)
Primary pointer page: 165, Index root page: 166
Data pages: 1, data page slots: 1, average fill: 8%
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0

Index PKMATERIAS (0)
Depth: 1, leaf buckets: 1, nodes: 6
Average data length: 1.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0

PRODUCCION (136)
Primary pointer page: 167, Index root page: 168
Data pages: 0, data page slots: 0, average fill: 0%
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0

Index FKPRODUCCION (1)
Depth: 1, leaf buckets: 1, nodes: 0
Average data length: 0.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0

Index PKPRODUCCION (0)
Depth: 1, leaf buckets: 1, nodes: 0
Average data length: 0.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0

SALIDAS (137)
Primary pointer page: 169, Index root page: 170
Data pages: 0, data page slots: 0, average fill: 0%
Fill distribution:
0 - 19% = 0
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0

Index FKSALMAT (1)
Depth: 1, leaf buckets: 1, nodes: 0
Average data length: 0.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0

Index PKSALIDAS (0)
Depth: 1, leaf buckets: 1, nodes: 0
Average data length: 0.00, total dup: 0, max dup: 0
Fill distribution:
0 - 19% = 1
20 - 39% = 0
40 - 59% = 0
60 - 79% = 0
80 - 99% = 0



[Non-text portions of this message have been removed]