> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# prisma-top-k-materialization

> A Prisma query loads an unbounded result that JavaScript sorts to keep the top rows.

## What it flags

Sorting an unbounded result with a numeric comparator to keep the top rows.

## How to review or fix

Use database ordering and a limit with a stable tie-breaker.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "prisma-top-k-materialization": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.