This document explains Firebase SQL Connect pricing details.

If you pay in a currency other than USD, the prices listed in your currency on
[Cloud Platform SKUs](https://cloud.google.com/skus) apply.

## Understand SQL Connect billing

Firebase SQL Connect consists of two billable components:

- The SQL Connect service itself.
- The Cloud SQL for PostgreSQL instance that contains your project data.

If you integrate with Vertex AI, you are billed for vector embeddings.

## SQL Connect service pricing

- Network egress has no cost up to 10 Gib/month; more than 10 Gib/month, egress
  is charged at
  [Google Cloud Internet Data Transfer Rate Premium Tier pricing](https://cloud.google.com/vpc/pricing#internet_egress).

- On Blaze plans, operations (queries or mutations) executed from clients incur
  no cost up to 250,000 operations per month; operations in excess of 250,000
  are charged at $0.90 per million.

  On Spark plans, you are limited to 8,300 operations per day, after which you
  won't be able to run any operations.

  > [!NOTE]
  > **Note:** The price is per operation and is not related to the amount of data read from the database; there is no "per row read" fee. Each SQL Connect operation can perform efficient, complex, multi-table queries or multi-row updates.

## Cloud SQL instance pricing

Cloud SQL pricing starts as low as $9.37 / month. Pricing varies based
on regions and configurations. See
[Cloud SQL pricing](https://cloud.google.com/sql/pricing#mysql-and-postgresql-pricing).

### No-cost trial on Spark plans

If your Firebase project is on the Spark plan, and you therefore don't have a
billing account attached to the project, your project is eligible for a
limited-time trial at no cost.

During the trial, you can create one database instance in your project with the
following limitations:

- The trial lasts 90 days. After 90 days, if you have not upgraded your project to a paid plan (Blaze), the database instance will be archived and won't be accessible to apps. After that, if you haven't upgraded your project 90 days after the database instance is archived, it will be deleted.
- The database instance has a daily limit of around 8000 operations and 330 MiB of egress.
- The database instance is not viewable or manageable in the Google Cloud console. (If necessary, you can use the [`gcloud sql`](https://docs.cloud.google.com/sdk/gcloud/reference/sql) family of commands.)
- You cannot change database instance settings such as storage and memory limits.
- You cannot create additional database instances after the first in Spark projects.

You are allowed a single trial database instance over the lifetime of a Firebase
project.

If you upgrade your project to the Blaze plan, your database instance will be
migrated to a paid Cloud SQL instance (see above).

### No-cost trial on Blaze plans

If your project is on the Blaze plan, and you therefore have a billing account
attached to it, you are qualified for a no-cost Cloud SQL trial
for 3 months.

To make use of the trial, accept the default configuration when you provision a
Cloud SQL for PostgreSQL instance.

- 5 free trials are available per billing account.
- 1 free trial Cloud SQL for PostgreSQL instance per project, although you can have multiple paid instances within that project.
- The default configuration of your Cloud SQL for PostgreSQL instance is equivalent to a [db-f1-micro instance](https://cloud.google.com/products/calculator?dl=CiRhNDU2NjBmOC1lODJiLTQ0NTctOTliNy00ZmEyZDAyYWFjYTMQBxokODA2Q0I5NzUtMTNEMC00QURFLTg5MUUtMDI2M0VGNzFBMDI0&e=13802955) that has 1 vCPU, 10 GB of storage, 628.74 MB of memory.

During the no cost trial, you can add computing resources to your
Cloud SQL instance, set up a private IP for your instance, and
create a read replica for your instance. When you make any changes to your
database instance configuration, you will exit the trial, at which point you
will be billed according to
[Cloud SQL pricing](https://cloud.google.com/sql/pricing#mysql-and-postgresql-pricing).

After 3 months, you are charged according to standard
[Cloud SQL pricing](https://cloud.google.com/sql/pricing#mysql-and-postgresql-pricing).

> [!NOTE]
> **Note:** If you delete your no cost trial instance, your no cost trial for the associated Firebase project will terminate immediately.

## Vertex AI embedding generation

Using SQL Connect with [Vertex AI](https://cloud.google.com/vertex-ai)
will incur standard usage charges from Vertex AI for embedding generation.

## Manage spending

To monitor your SQL Connect usage, access an overall view of all
service activity, and find links to analyze individual service activity, use the
Firebase console (go to **Databases \& Storage** \>
[**SQL Connect**](https://console.firebase.google.com/project/_/dataconnect)).
Use the dashboards in the console to gauge your usage over different time
periods.

To track your SQL Connect costs, create a monthly budget. Budgets
won't limit your usage, but you can set alerts to notify you when you're
approaching or exceeding your planned costs for the month. To set a budget and
create a budget alert for your Cloud Billing account, go to the
[**Billing account management** page](https://console.cloud.google.com/billing/)
in the Google Cloud console. You can use the default alert settings or modify
the alerts to send notifications at different percentages of your monthly
budget.

Learn more about
[setting up budget alerts](https://firebase.google.com/docs/projects/billing/budget-alerts.md.txt).