Firebird: Filesize lazarus / 16-Databases ---------------------------------------------------------------------- asdf · 2010-11-18 23:30 Testing .... sql1.sql.text:='insert into table1 ................83,232 records [file size = 19.7 Mb] . . sql1.sql.text:='delete table1 .....................delete all records . . sql1.sql.text:='insert into table1 ................83,232 records [file size = 38.4 Mb] Latest record number is 83,232 records, but why is the file size so big/bigger than 1st time ?(I thought it still kept the deleted records.) What should be done ? ---------------------------------------------------------------------- DelphiFreak · 2010-11-19 02:36 You need gbak to shrink the firebird database file. gbak ist a command-line tool in the bin-folder of your firebird installation. I have written a graphical user interface for this command-line tool. See attached source. Compile it. The make sure firebird server is running. Start the Firebird_Compress_DB application and shrink your db-file. ---------------------------------------------------------------------- asdf · 2010-11-19 05:15 Thank you And one more please What is the difference 38.4 - 19.7 = Approximately 18.7 Mb ? ---------------------------------------------------------------------- asdf · 2010-11-27 05:00 From http://www.firebirdsql.org/manual/gfix-housekeeping.html Firebirds still kept all deleted records for safety reason. How can I write the code to use gfix after deleting ?