How to shrink virtuoso.db file size after deleting a large graph?

265 Views Asked by At

I deleted a large graph in the conductor of a Virtuoso SPARQL 7.20.3217 endpoint but the size of virtuoso.db is still 3.6 GB as it was before, even after restarting the server. Is there a command to clean the database and delete leftover parts like cache and indexes?

1

There are 1 best solutions below

2
On BEST ANSWER

As you've noticed, deleting data from the DB does not immediately free the disk space previously occupied by that data. Virtuoso has an auto-compaction feature which will eventually free space. New data will be loaded into the space previously occupied by deleted data, but of course this reuse will be imperfect. You may be able to free some space by running a CHECKPOINT; or the DB..VACUUM (); procedure. You can also do a backup-dump-and-reload to immediately reclaim disk – though you must temporarily consume substantially more disk space during this process. Indexes can also be dropped and rebuilt, but this does not generally free up very much disk, in itself.