# Small AI database questions can become big scans

> Source: <https://dev.to/mads_hansen_27b33ebfee4c9/small-ai-database-questions-can-become-big-scans-67i>
> Published: 2026-05-23 00:16:51+00:00

A small question can become a big database scan when an AI agent writes the query.
“Show me customers at risk” sounds harmless.
But depending on schema context, the agent might join:
Then it may retry when the first query does not answer the question.
For production MCP database servers, row limits should be treated as a safety boundary, not a UI preference.
Useful defaults:
Longer version: Row limits for AI database agents
The model should never summarize 50 preview rows as if it saw the whole database.
