Security

Query Sandbox

A query sandbox is a restricted execution environment where queries run under strict limits—on permissions, runtime, and resources—so that no query, however wrong, can damage the database or the data.

In Depth

A sandbox assumes queries will sometimes be bad and makes badness harmless. Typical restrictions: read-only permissions (writes are impossible), statement timeouts (a runaway query gets killed instead of saturating the server), row limits (no accidental million-row exports), and an allowlist of permitted operations. Sandboxing matters most when query authors are not experts—exactly the situation with self-service and AI-generated SQL, where the volume of queries goes up and the average scrutiny per query goes down. With a proper sandbox, the worst case shifts from "incident" to "unhelpful result", which is what makes broad data access safe to offer at all.

How AI for Database Helps

AI for Database constrains execution by default—queries are validated against your schema and run read-only, so exploration carries no risk to your data.

Related Terms

Ready to try AI for Database?

Query your database in plain English. No SQL required. Start free today.

Free plan available · No credit card required