> ## 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.

# service-query-in-loop

> A loop calls a project function that runs several database operations per item.

## What it flags

A call in a loop reaches several database operations through a project function, so the loop pays round trips for every item.

## How to review or fix

Add a batch variant. Test, seed, benchmark and script sources get a softer note.

## Configuration

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

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


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