---
title: "Compare performance"
url: "https://docs.yugabyte.com/stable/yugabyte-voyager/reference/compare-performance/"
---

# Compare performance

YugabyteDB Voyager compare performance reference

yb-voyager compare-performance

Compare query performance between the source database and the target YugabyteDB database.

This command analyzes statistics collected during [assess migration](/stable/yugabyte-voyager/reference/assess-migration/ "assess migration") from the source database, compares it with statistics collected from the target YugabyteDB database, The command generates both HTML and JSON reports for easy query comparison.

## Syntax

```text
Usage: yb-voyager compare-performance [ <arguments> ... ]
```

### Arguments

The valid *arguments* for compare performance are described in the following table:

CLI flag

Config file parameter Description 

-e, --export-dir

```yaml
export-dir:
```

Path to the export directory. This directory is a workspace used to store exported schema DDL files, export data files, migration state, and a log file. 

-l, --log-level

```yaml
log-level:
```

Log level for yb-voyager.  
Accepted values: trace, debug, info, warn, error, fatal, panic  
Default: info 

--log-max-size-mb

```yaml
log-max-size-mb:
```

Maximum size in MB of a yb-voyager log file before it is rotated. Also applies to the Debezium log file during live migration.  
Default: 200 

--log-max-backups

```yaml
log-max-backups:
```

Maximum number of rotated log files to retain. Older files are deleted. Use -1 to retain all rotated log files.  
Default: 10 

--send-diagnostics

```yaml
send-diagnostics:
```

Enable or disable sending [diagnostics](/stable/yugabyte-voyager/reference/diagnostics-report/ "diagnostics") information to Yugabyte.  
Default: true  
Accepted parameters: true, false, yes, no, 0, 1 

--target-db-host

```yaml
target:
  db-host:
```

Domain name or IP address of the machine on which the target database server is running.  
Default: "127.0.0.1" 

--target-db-name

```yaml
target:
  db-name:
```

Target database name. 

--target-db-password

```yaml
target:
  db-password:
```

Password to connect to the target YugabyteDB database. Alternatively, you can also specify the password by setting the environment variable `TARGET_DB_PASSWORD`. If you don't provide a password via the CLI during any migration phase, yb-voyager will prompt you at runtime for a password. If the password contains special characters that are interpreted by the shell (for example, # and $), enclose the password in single quotes. 

--target-db-port

```yaml
target:
  db-port:
```

Port number of the target database machine.  
Default: 5433 

--target-db-schema

```yaml
target:
  db-schema:
```

Schema name of the target database. Works for MySQL and Oracle only. For PostgreSQL, you can ALTER schema name post import. 

--target-db-user

```yaml
target:
  db-user:
```

Username of the target database. 

[--target-ssl-cert](/stable/yugabyte-voyager/reference/yb-voyager-cli/#ssl-connectivity "--target-ssl-cert")

```yaml
target:
  ssl-cert:
```

Path to a file containing the certificate which is part of the SSL `<cert,key>` pair. 

[--target-ssl-crl](/stable/yugabyte-voyager/reference/yb-voyager-cli/#ssl-connectivity "--target-ssl-crl")

```yaml
target:
  ssl-crl:
```

Path to a file containing the SSL certificate revocation list (CRL). 

[--target-ssl-key](/stable/yugabyte-voyager/reference/yb-voyager-cli/#ssl-connectivity "--target-ssl-key")

```yaml
target:
  ssl-key:
```

Path to a file containing the key which is part of the SSL `<cert,key>` pair. 

[--target-ssl-mode](/stable/yugabyte-voyager/reference/yb-voyager-cli/#ssl-connectivity "--target-ssl-mode")

```yaml
target:
  ssl-mode:
```

Specify the SSL mode for the target database as one of `disable`, `allow`, `prefer` (default), `require`, `verify-ca`, or `verify-full`. 

[--target-ssl-root-cert](/stable/yugabyte-voyager/reference/yb-voyager-cli/#ssl-connectivity "--target-ssl-root-cert")

```yaml
target:
  ssl-root-cert:
```

Path to a file containing target SSL certificate authority (CA) certificate(s). 

--start-clean — Cleans up existing performance comparison reports before generating new ones.  
Default: false  
Accepted parameters: true, false, yes, no, 0, 1. 

-h, --help — Command line help. 

-y, --yes — Answer yes to all prompts during migration.  
Default: false 

-c, --config-file — Path to a [configuration file](/stable/yugabyte-voyager/reference/configuration-file "configuration file").

### Example

Configuration file:

```sh
yb-voyager compare-performance --config-file <path-to-config-file>
```

CLI:

```sh
yb-voyager compare-performance
        --target-db-host localhost \
        --target-db-port 5433 \
        --target-db-name yugabyte \
        --target-db-user yugabyte \
        --target-db-password password \
        --export-dir /dir/export-dir
```
