Regional SQL database for apps

Run SQL in São Paulo, San Francisco Bay Area, or Frankfurt. Start at $0 with up to 256 statements in one atomic request.

SQL queries and databases in one workspace

Place each database in one or more of São Paulo, San Francisco Bay Area, or Frankfurt, run transactions, and verify written operation units.

Compare all five plans

TerraScale / Databases
  • GR orders-prod São Paulo · gru Active 14k
  • SJ billing-ledger Bay Area · sjc Active 8.2k
  • FR inventory-eu Frankfurt · fra Active 5.9k
  • GR auth-sessions São Paulo · gru Synced 2.4k
  • SJ events-log Bay Area · sjc Synced 19k
  • FR catalog-de Frankfurt · fra Synced 1.1k
  • GR jobs-queue São Paulo · gru Synced 640
  • SJ audit-trail Bay Area · sjc Synced 4.3k
  • FR pricing-cache Frankfurt · fra Synced 920
gru · 2 units
BEGIN;INSERT INTO orders (id, org_id, total_cents, currency)  VALUES ('ord_8841', 'org_412', 2000, 'USD');UPDATE accounts SET order_count = order_count + 1  WHERE org_id = 'org_412';SELECT id, org_id, total_cents, currency  FROM orders WHERE org_id = 'org_412' ORDER BY id DESC LIMIT 4;COMMIT;-- Region: São Paulo (gru) · Reads not billed
Committed in gru: 2 rows written, 2 operation units, 0 units for SELECT.

Standard Postgres wire protocol. Typed clients, transactions, and functions included.

Connect with Postgres drivers and SDKs

Query SQLite-dialect SQL over the Postgres wire protocol from psql and drivers, or use the C#, TypeScript, Go, Python, and Rust SDKs. Get started

Client drivers
Example clients
  • PostgreSQL wire Connect via psql and drivers Connected
  • TypeScript client Typed queries and transactions Connected
  • C# client Typed .NET database client SDK
  • .NET runtime Shared connection pooling Connected

Batch 256 statements in one transaction

Group up to 256 SQL statements and 1,024 changed rows so multi-table writes commit or roll back atomically.

orders-prod · gru psql gru
~/app/sql $ psql -f settle_batch.sql
3 of 3 steps
BEGIN TRANSACTION gru ok
INSERT 12 ledger rows 12 stmts 12 units
SELECT balance check read 0 units
COMMIT 12 / 256 limit

Run SQL inside functions

Each invocation counts as one operation unit, except refused invocations. There is no CPU or duration charge, and SQL inside a function counts like any other SQL.

Plan rules
  • HTTP and cron functions 1 operation unit each, no CPU charge. Refused invocations are not counted.
  • Postgres wire protocol Standard psql and client drivers
  • Point-in-time recovery 1 to 30 days by plan
  • Client egress $0.10/GB published rate, not billed yet
  • Operation-unit cap Paid plans stop writes and function invocations at the plan cap. Enterprise has no operation-unit ceiling.

Pay per 4 KiB written

Each started 4 KiB successfully written counts as one operation unit, and each changed row counts at least one unit. SQL reads stay free of billing.

  • orders-prod · gru write 3,120 bytes written · 1 operation unit SQL
  • SJ billing-ledger · sjc write 14,800 bytes written · 4 operation units
  • inventory-eu · fra SELECT 240 rows read · 0 units billed

TerraScale meters each started 4 KiB written as one operation unit, and each changed row counts at least one unit. SQL reads are not billed, each function invocation counts as one operation unit except when refused, with no CPU or duration charge, and every region a database runs in accepts its writes.

Per operation unit written
4 KiB
Billed for SQL reads
$0
Max statements per request
256

Three regions for reads and writes

Place each database close to your users, in one region or several. Every region in its set accepts reads and writes directly. Public Alpha carries no SLA, and features, limits, and APIs may change.

  • São Paulo

    Brazil · reads and writes

    gru
  • San Francisco Bay Area

    United States · reads and writes

    sjc
  • Frankfurt

    Germany · reads and writes

    fra

Read about TerraBase and Public Alpha

Pricing in USD

Start on Free without a card. Yearly plans on Starter, Pro, and Team cost ten monthly payments.

See Starter, Enterprise, and yearly billing

Free

For trying TerraScale with no card and no overage charges.

$0 / month
Start on Free
  • 1 project, 1 database, 1 member
  • 0.1 GB storage included
  • 50,000 operation units/month
  • Writes and function invocations stop at allowance, no overages
  • Community support

Team

For multi-project teams needing larger storage and faster response targets.

$50 / month · $500/year
Choose Team
  • 100 projects, 100 databases, 100 members
  • 25 GB storage ($0.50/GB-month overage)
  • 5,000,000 operation units/month
  • $5 per million overage units
  • Support target 8 hours, not an SLA

Questions

Key details on operation units, transaction limits, functions, and Public Alpha terms.

Contact TerraScale support

What counts as one operation unit?

Each started 4 KiB (4,096 bytes) successfully written counts as one operation unit. Each changed row counts at least one unit, so two changed rows are at least two units. Each function invocation counts as one operation unit. Refused invocations are not counted. SQL reads are not billed.

How many statements fit in one request?

You can run up to 256 statements in one request, executed atomically as one transaction that changes at most 1,024 rows.

Are function invocations billed for CPU or duration?

No. Each invocation counts as one operation unit, except refused invocations. There is no CPU or duration charge, and SQL inside a function counts like any other SQL.

Can the Free plan generate overage charges?

No. Free needs no card and has no overage charge. Writes and function invocations stop when you hit 50,000 operation units in a month.

Does Public Alpha come with an SLA?

No. TerraScale is in Public Alpha with no SLA, and features, limits, and APIs may change. Paid support times are targets.