Time to close a database

How long should it take to close an open database? I have saved the database and then closed it, two separate steps. It just took about 09:51 to close. Is there a way to speed up this procedure?

LibreOffice 24.2.5.2 (X86_64)
Windows 11 Home
Version 23H2
OS Build 22631.4037

Which database do you use? Internal HSQLDB?
What do you save inside the database? Pictures?
How big is the file?

I use the Internal HSQLDB.

Mostly Decimal fields, two vchar fields in one table and one vchar field in the second table. One Int field (index) in each table. No pictures.

ODB file is 28,973 KB
Table 1 has 196410 records with 9 fields each
Table 2 has 686195 records with 6 fields each

Here you will need an answer from users, who use HSQLDB (or any database with JDBC-connetion) with so much rows.
Try with Table 2: How much time do you need to scroll from first row to last row?
Then create an internal Firebird database (set experimental features on for only creating this - then off again). Copy Table 2 to this database - hope it will work with so much rows. If it works: How much time do you need for getting last row?
Have tested this on my system some times ago with only 30000 records and 15 columns. Internal HSQLDB needs about 30 seconds, internal Firebird needs 1 second. Same behavior when connecting to MariaDB through JDBC instead of direct connection to MariaDB.

The Embedded Base format is handy for a learning tool but isn’t a good environment for serious applications. An Embedded Base ,odb has all the table data plus queries, forms, reports and a 2008 vintage HSQL database engine all compressed into a zip archive which explains why with your large tables it takes so long to close the database. I’m surprised that you haven’t experienced data loss issues from a corrupted .obd file.

The largest data set I have used has 34,000+ rows, so I can’t say for sure how well it would work with your dataset but try using a JDBC connection where the table data and a more recent version of HSQL are stored outside the .odb file then only the queries, forms and reports are compressed into the zip archive (odb). The table data is stored in a separate file structured for HSQL and not compressed.

You can download a wizard for creating a JDBC connected database from
[Wizard] Create a new ‘split’ HSQL 2.x databaset=61183

You must manually copy the tables, queries, forms and reports from the Embedded database into the JDBC connected one.

It is usually best to create the tables before copying the data, so the field type and size are correct but be aware that once created, the GUI is disabled and the table structure in a JDBC connected database can only be edited using SQL commands.

Actually. I’ve found that with a little practice and a few templates I prefer creating tables using SQL. A tutorial on that can be found at https://wiki.documentfoundation.org/images/0/02/Base_tutorial.pdf Chapter 7 has some good examples.

1 Like