Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions content/250-postgres/300-database/750-serverless-driver.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The serverless driver uses HTTP and WebSocket protocols instead of TCP, enabling
- Pipeline multiple queries over a single connection, reducing latency by up to 3x
- SQL template literals with automatic parameterization and full TypeScript support
- Built-in transactions, batch operations, and extensible type system
- Automatic connection pooling across [all available Prisma Postgres regions](/postgres/more/faq#what-regions-is-prisma-postgres-available-in) for optimal performance

Use this driver for edge/serverless environments without full Node.js support, or when working with large result sets that benefit from streaming.

Expand Down Expand Up @@ -95,7 +96,7 @@ console.log(users[0].name)

### Use with Prisma ORM

Use the `PrismaPostgresAdapter` to connect Prisma Client via the serverless driver:
Use the [`PrismaPostgresAdapter`](https://www.npmjs.com/package/@prisma/adapter-ppg) to connect Prisma Client via the serverless driver:

```ts
import { PrismaClient } from '../generated/prisma/client'
Expand Down Expand Up @@ -317,11 +318,18 @@ try {
}
```

## Connection pooling enabled by default

The serverless driver automatically uses connection pooling [across all available Prisma Postgres regions](/postgres/more/faq#what-regions-is-prisma-postgres-available-in) for optimal performance and resource utilization.

Connection pooling is enabled by default and requires no additional configuration.

This ensures efficient database connections regardless of your deployment region, reducing connection overhead and improving query performance.

## Limitations

- Requires a Prisma Postgres instance and does not work with [local development](/postgres/database/local-development) databases
- Currently in Early Access and not yet recommended for production
- Connection pooling is not currently supported and is planned to be supported when [`@prisma/ppg`](https://www.npmjs.com/package/@prisma/ppg) reaches [General Availability](/orm/more/releases#generally-available-ga)

## Learn more

Expand Down
Loading