Is possible to remove Firebird deleted records from database
Moderators: gto, cipto_kh, EgonHugeist
Is possible to remove Firebird deleted records from database
Is possible to remove Firebird deleted records from database????
i inserted records on a db till 130 MB
I deleted 100 mB .
I used Sweep from IBO but file still haves 130 MB.
How can i remove it from File ?????
And How can i change transact isolation to READ COMMIT on ZeosLib ????
i inserted records on a db till 130 MB
I deleted 100 mB .
I used Sweep from IBO but file still haves 130 MB.
How can i remove it from File ?????
And How can i change transact isolation to READ COMMIT on ZeosLib ????
where's the code ..
Ok, but i uses the IBO program sweep (Pressd the button) so i should do the job and it still the same size.
???? not a backup.. because if is working on the client it should work all day (add remove records)
Who can i do remove the records without recreate and coping it "manually" (from one to other new database )
???? not a backup.. because if is working on the client it should work all day (add remove records)
Who can i do remove the records without recreate and coping it "manually" (from one to other new database )
where's the code ..
Ok, you can call the gfix program instead of the dlls. Sounds good.
Eventually try this example
Sweep Database now
gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -sweep
Set Sweep Interval to 50000 transactions
gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -h 50000
Or call it every night![Wink :wink:](./images/smilies/icon_wink.gif)
Eventually try this example
Sweep Database now
gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -sweep
Set Sweep Interval to 50000 transactions
gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -h 50000
Or call it every night
![Wink :wink:](./images/smilies/icon_wink.gif)
-
- Platinum Boarder
- Posts: 1918
- Joined: 17.01.2011, 14:17
Hello sfxcc,
as far as I understand firebird, sweeping is not for actually shrinking the size of the database file. Sweeping checks the internal DB structures for outdated records and marks the space they occupy to be usable again. This way the engine can reuse the space for newly inserted records.
This means in normal operation the database file will only grow but never shrink. But normally the size of the file stabilizes after some time and only grows if you insert more records than you delete.
The only way of actually shrinking the size of the database file is to have a full backup - restore cycle.
as far as I understand firebird, sweeping is not for actually shrinking the size of the database file. Sweeping checks the internal DB structures for outdated records and marks the space they occupy to be usable again. This way the engine can reuse the space for newly inserted records.
This means in normal operation the database file will only grow but never shrink. But normally the size of the file stabilizes after some time and only grows if you insert more records than you delete.
The only way of actually shrinking the size of the database file is to have a full backup - restore cycle.