Detect N+1 query patterns (SIXTA)
sixta_detect_n_plus_oneFind N+1 query patterns in an application's query log — no connection needed. Paste an ORM/SQL trace (Rails ActiveRecord, Django, Hibernate, Prisma, or a raw SQL log) and get the query shapes that fire many times in the trace (one parent query, then the same per-row lookup repeated) with the framework-specific eager-load fix (includes / select_related / JOIN FETCH / include). Use when the user pastes app logs or asks 'why are there so many queries' / 'do I have an N+1'. Input is analyzed in memory and never stored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace | Yes | An application query log / ORM SQL trace (Rails, Django, Hibernate, Prisma) or a raw SQL log, one statement per line | |
| engine | No | Database engine: postgresql or mysql. Optional. | |
| version | No | Engine version, e.g. '16' (PostgreSQL major) or '8.0.35' (MySQL). Omit for a modern default; some verdicts are version-dependent and the assumption is stated in the result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engine | No | Engine the analysis targeted, when known. | |
| report | Yes | The full human-readable SIXTA report (markdown). | |
| findings | No | Named findings as structured data, when the tool produces them. | |
| finding_count | No | Number of findings/issues identified. | |
| overall_severity | No | Highest severity across findings (Critical/High/Medium/Low/Info). |