---
title: Limits
description: What's actually enforced today on base_run_sql and the pooler — one statement per call, a character cap, and transaction-mode's prepared-statement restriction.
---

# Limits

sherbase doesn't impose a fixed cap on the number of databases an
account can create. What's actually enforced today is narrower, and
specific to running queries.

## One statement per base_run_sql call

`base_run_sql` runs your SQL through Postgres's extended query
protocol, which parses the text as a single prepared statement before
executing anything. A `;`-separated string with more than one statement
in it is rejected outright — `cannot insert multiple commands into a
prepared statement` — rather than run partially or truncated. If you
need several statements, call `base_run_sql` once per statement.

## A character cap on the SQL text

A single `base_run_sql` call's SQL text is capped at 100,000 characters.
Exceeding it returns a `400` naming the limit, before the query is sent
to the database at all.

## A statement timeout

Every `base_run_sql` call runs with a 5-second statement timeout. A
query that hasn't returned by then is cancelled rather than left to run
indefinitely.

## Prepared statements and the transaction pooler

The transaction-mode pooler (port 6543 — see
[connection strings](/sherbase/connection-strings)) does not support
prepared statements. A driver or ORM that relies on them needs the
session-mode pooler (port 5432) instead.
