Learn R Programming

mpathsenser (version 1.2.3)

vacuum_db: Vacuum a database

Description

[Stable]

This is a convenience function that calls the VACUUM command on a database. This command will rebuild the database file, repacking it into a minimal amount of disk space.

Usage

vacuum_db(db)

Value

a scalar numeric that specifies the number of rows affected by the vacuum.

Arguments

db

A database connection to an m-Path Sense database.

Examples

Run this code
# Create a database in a temporary directory
db <- create_db(tempdir(), "mydb.db")

# Assuming that we have imported some data into the database, we can vacuum it
vacuum_db(db)

# Cleanup
close_db(db)
file.remove(file.path(tempdir(), "mydb.db"))

Run the code above in your browser using DataLab