---
title: "sql_strip_pagination | Speedscale Docs"
description: "Make a Postgres, MySQL or SQL Server mock match any LIMIT, OFFSET or FETCH value, with the sql_strip_pagination transform."
canonical: "https://docs.speedscale.com/guides/transformation/transforms/sql_strip_pagination/"
---

[Documentation index](https://docs.speedscale.com/guides/llms.txt) | [Markdown](https://docs.speedscale.com/guides/transformation/transforms/sql_strip_pagination/index.md) | [Canonical page](https://docs.speedscale.com/guides/transformation/transforms/sql_strip_pagination/)

# sql\_strip\_pagination

The `sql_strip_pagination` transform makes a Postgres, MySQL or SQL Server mock match whatever page of results a statement asks for.

*   **Transform type name (config/API):** `sql_strip_pagination`
*   **Shorthand format:** `sql_strip_pagination()`
*   **Where it has effect:** mock (responder) only. It changes the mock signature, not the recording or the request.

<a id="quick-start"></a>

## Quick Start

```json
{
  "extractor": { "type": "sql_query" },
  "transforms": [{ "type": "sql_strip_pagination" }]
}
```

<a id="how-it-works"></a>

## How It Works

The numbers after `LIMIT`, `OFFSET` and `FETCH FIRST` or `FETCH NEXT` become `?`, including both numbers of the MySQL `LIMIT offset, count` form. Every other literal is kept.

The transform rewrites the SQL statement in the signature of Postgres, MySQL and SQL Server requests and passes the token through unchanged, so the statement the recording shows and the statement the app sends stay as written. Chains of SQL transforms compose: each one starts from the statement the previous one left in the signature. On any other traffic, and during load generation, it does nothing.

<a id="example"></a>

## Example

Recorded:

```sql
SELECT id FROM orders WHERE tenant = 3 ORDER BY id LIMIT 20 OFFSET 0
```

Live request:

```sql
SELECT id FROM orders WHERE tenant = 3 ORDER BY id LIMIT 20 OFFSET 40
```

Both are matched on:

```sql
SELECT id FROM orders WHERE tenant = 3 ORDER BY id LIMIT ? OFFSET ?
```

<a id="when-to-use-it"></a>

## When To Use It

Use it when a replay pages further or in a different order than the recording, and any recorded page is an acceptable answer.

<a id="related"></a>

## Related

*   [Matching SQL mocks](https://docs.speedscale.com/guides/databases/mock-a-database/) explains what SQL mocks match on by default and when the mock server falls back to looser matches.
*   [`sql_query`](https://docs.speedscale.com/guides/transformation/extractors/sql_query/) is the extractor to pair it with.
