Overview
Koala handles large SQL statements by compressing and chunking requests so you can run complex queries without manual changes.Query size tiers
- Small: Under 24 KB (sent as-is)
- Medium: 24–120 KB (gzip compression applied)
- Large: 120 KB+ (smart chunking plus compression)
Size is calculated from the raw SQL text. Whitespace and comments count toward total size.
How large SQL is handled
- Gzip compression: Automatically compresses SQL payloads before sending.
- Smart chunking: Splits very large statements into SOAP-safe chunks while preserving statement boundaries.
- SOAP parameter optimization: Uses efficient parameter encoding to reduce overhead.
Best practices
- Keep comments concise to reduce payload size.
- Use bind variables to avoid repeating literal values.
- Validate SQL formatting before execution to avoid chunk boundary errors.
- Prefer CTEs over deeply nested subqueries for readability.

