Databases

Serverless SQLite for every project

Every project can attach SQLite databases that persist across deployments. Migrations in your repository are applied automatically on deploy, and the dashboard gives you a SQL editor, table browser, and query performance insights.

Database Explorer

Total Queries

31,962

Last 24 hours

Avg Exec Time

3.2ms

P95: 12ms

Rows Read

293K

Last 24 hours

Rows Written

7,621

Last 24 hours

Top Queries by Execution Time

Most expensive queries in the last 24 hours

QueryCallsAvg TimeRows Read
SELECT * FROM users WHERE active = ?12,4532.3ms45,231
SELECT * FROM orders WHERE user_id = ?8,7214.1ms89,234
INSERT INTO sessions (user_id, token) VALUES (?, ?)5,4321.2ms0
SELECT p.*, c.name FROM products p JOIN categories c...3,2118.7ms156,432
UPDATE users SET last_login = ? WHERE id = ?2,1451.8ms2,145

Key Features

Migrations From Git

SQL migrations in your repository run in order on every deploy, including Drizzle-generated folders.

SQL Editor

Run queries against production or a preview database directly in the dashboard.

Table Browser

Browse tables, inspect schemas, and page through rows without writing a query.

Query Insights

See your slowest and most frequent queries so you know what to index.

D1-Compatible API

prepare, bind, batch, and exec, so existing D1 code and Drizzle setups port over unchanged.

AI Query Generation

Describe the data you need and let the dashboard draft the SQL for you.

Database Binding

Declare a database in ploy.yaml and query it through env with a D1-compatible API.

src/index.ts
export default {
  async fetch(request, env) {
    const { results } = await env.DB
      .prepare("SELECT * FROM users")
      .all();

    return Response.json({ users: results });
  },
} satisfies Ploy;

Ready to get started?

Deploy your first project in minutes with Ploy.