# Logging on a separate device

You can improve the performance of update-intensive, large databases by putting a database's log on a separate device, which reduces I/O contention.

By default, the transaction log is in the `log` subdirectory of the database directory. Use either of the following methods to store this `log` subdirectory in another location:

- Specify the non-default location by using the `logDevice=logDirectoryPath` attribute on the database connection URL when you create the database.
- If the database is already created, move the log manually and update the `service.properties` file.

- Using the logDevice=logDirectoryPath attribute
  To specify a non-default location for the log directory, set the logDevice=logDirectoryPath attribute on the database connection URL.
- Example of creating a log in a non-default location
  The following database connection URL creates a database in the directory d:/mydatabases, but puts the database log directory in h:/janets/tourslog.
- Example of moving a log manually
  If you want to move the log to g:/bigdisk/tourslog, move the log with operating system commands.
- Issues for logging in a non-default location
  When the log is not in the default location, backing up and restoring a database can require extra steps.

Parent topic: Part Two: Derby Administration Guide
Related concepts
Maintaining database integrity
Checking database consistency
Backing up and restoring databases
Importing and exporting data
Replicating databases
Obtaining locking information
Reclaiming unused space