> ## 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-query-in-loop

> A Prisma query runs once per loop iteration.

## What it flags

Per-item queries.

## How to review or fix

Consider a parameterized set query, relation load or bulk write if ordering and transaction behavior permit it. Prisma can already batch compatible `findUnique` calls.

Contextual findings flag writes that consume an earlier awaited result or whose returned row feeds a later awaited operation for the same item. Review those dependencies and the ordering of side effects before changing the loop.

## Configuration

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

```json theme={null}
{
  "rules": { "prisma-query-in-loop": "off" }
}
```


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