# Group queries by shape

> A query shape is a statement with literals replaced by ?. See the fingerprint rules and the Shapes tab columns for count, total, average and max.

Source: https://sqleye.com/docs/live-eye/query-shapes/ · Last updated: 2026-11-29 · Publisher: CodeROG (https://coderog.com)

A query shape is a statement with its values removed, so `WHERE id = 1` and `WHERE id = 2` count as one shape. The Shapes tab lists each shape with its count and timings.

## How is a shape computed?

| Rule | Example |
|---|---|
| Literals become `?` | `WHERE id = 42` becomes `WHERE id = ?` |
| `IN (...)` lists collapse | `IN (1, 2, 3)` becomes `IN (?+)` |
| Comments are stripped | |
| Whitespace is collapsed | |
| Case is kept as written | `select` and `SELECT` are different shapes |

Each shape also gets a hash: 16 hex digits (FNV-1a, 64 bit). The detail panel shows it as Shape hash.

## What does the Shapes tab show?

| Column | Meaning |
|---|---|
| Shape | The normalised statement |
| Count | Times it ran |
| Total | Summed duration |
| Avg | Average duration |
| Max | Longest duration |
| N+1 hits | Times it was part of an [N+1 group](/docs/live-eye/n-plus-one/) |

Click a column header to sort. The default is Total, descending, which puts the shapes using the most database time first. SQLEye keeps statistics for at most 10,000 shapes.

## How do I see every run of a shape?

Select an event in the Live tab and choose **Filter to this shape**. A shape chip appears in the toolbar; **Reset filters** removes it. See [filters](/docs/live-eye/filters/).
