Installation
If you have not already done so, install Crystal DBA.
Using Crystal DBA
To use Crystal DBA with your database, you need to provide connection details.
If you can connect to your database using a PostgreSQL client such as the psql interactive terminal or the pgAdmin tool, then you can connect to it with the Crystal DBA CLI.
You have choices for how to provide connection details:
-
Using command-line arguments
You can provide the connection details as individual command-line arguments:
crystaldba -h localhost -p 5432 -U postgres -d mydb
The available options are:
-h
or--host
: Database server hostname (default: “localhost”)-p
or--port
: Database server port (default: “5432”)-U
or-u
or--username
: Database username (default: “postgres”)-d
or--dbname
: Database name (default: “postgres”)
Crystal DBA will prompt you for the password if not provided.
-
Using a connection URI
Alternatively, you can provide all connection details in a single URI string:
crystaldba postgres://username:password@hostname:5432/dbname
The URI format follows the standard PostgreSQL connection string format:
postgres://username:password@hostname:port/dbname
Crystal DBA will prompt you for the password if not provided.
Crystal DBA only uses the connection information to connect to your database. It never transmits it to the cloud service or underlying AI systems.
Registration
When you first run the Crystal DBA CLI tool, you will be asked a few questions to help set up your environment.
Crystal DBA first asks you to provide your email address and to accept the terms of service. This is a required step that helps us ensure compliance and integrity of the cloud service. You will also be subscribed to our product updates and other business communications. You can opt-out of these at any time. Registration is free and does not require a credit card.
Once you accept the terms of service, you will be offered the opportunity to share data with Crystal DBA to help us make our products better. Sharing usage data with Crystal DBA is optional. If you choose not to share, your usage data will be used for limited purposes, such as security, as described in the Terms and Conditions.
You are now ready to start asking questions about your database.
Try Crystal DBA
Here are some questions that you can ask to get started:
- What are the slowest queries on this system?
- Please report on the health of this database.
- Is this query missing any indexes: <your query here>?
- What is the database doing right now?
Note that advanced features of Crystal DBA, such as historical data analysis, require the Team deployment model. Contact us to learn more.