Parameter profiling for SQL Server Extended Events rpc_completed captures.
ParamLens reads the exec sp_executesql … calls captured by Extended Events and shows how the
application really calls each query: parameter value distributions, combinations, cost per call
pattern and, above all, catch-all predicates (@p = 0 OR col = @p) that turn into a pass-through in
most executions. Built for the usual ORM/low-code problems (OutSystems, Entity Framework, …): optional
ORs, parameter sniffing, inline IN lists and parameter type/size variations.
▶ Try it online: the full analysis runs in your browser on synthetic sample data. Nothing to install, nothing uploaded.
See the feature tour with screenshots →
| ParamLens.exe | Windows, single executable, no installation. Connects to SQL Server. |
| ParamLens.html | Any browser, fully offline. Analyzes a file you export from SQL Server. Use it when you cannot run the .exe. |
Every version ever published stays available on the Releases page, each with a
.sha256 checksum. The .exe is not code-signed, so Windows SmartScreen may ask for confirmation
(More info › Run anyway).
With the .exe
- Run
ParamLens.exe: the interface opens in its own window (closing it quits). - Connect to the SQL Server and pick the table with the captured events (or a
.xelfile on the server). - Click Analyze and start with the All findings tab.
With the .html
- Open
ParamLens.htmlin the browser. - Export the events: the page builds the
bcpcommand and the SSMS query for you. A plainSELECT *of the event table saved as CSV also works. - Drop the file onto the page and click Analyze.
No server at hand? In the .exe, Load sample data shows everything with synthetic data.
The interface is in English and can be switched to Portuguese (pt-BR) in the header.
More in the user guide.
- Catch-all predicates (
@x = 0 OR …,@d = @nullDate OR …,ISNULL(@p, …)) and the % of executions in which each one is true, with the average cost in both cases. - Call shapes: which filters were really applied together, with % of executions and % of cost.
- Parameters: type, cardinality, most frequent values, % NULL, value classes (NULL, 0, '', null date…).
- Combinations of parameter values of your choice, exportable as CSV.
- Inline IN lists as pseudo-parameters, and how many distinct SQL texts they create.
- Findings ranked by severity: dominant values with unequal cost (parameter sniffing), diverging parameter declarations, constant parameters, disproportionately expensive combinations.
- Test script:
DECLARE+ SQL of a real execution, ready for SSMS. - Parameter export: the exact values of every call of a query (one row per execution or per
combination) as a SQL script with an optional replay loop for Query Store, as CSV, or inserted straight
into a table of your choice. Hard-coded values of the SQL go too: inline
INlists as comma-separated text forSTRING_SPLIT, and literals compared with a column. - Executions over time: every call of a query with its date and time, or grouped per minute, hour, day, hour of the day or day of the week, to see when it runs and when it gets slow.
- Before × after comparison: pick the original query and the rewrite, in the same capture or in two
captures (another table,
.xelor file), and get the change in average, p50, p95, p99 and max of duration, CPU and reads. - HTML report you can export and open offline.
- Find the catch-all ORs, sniffing-prone values and expensive call shapes of a query.
- Export its parameters exactly as the application sent them and replay them against the original and the rewritten query (SQLQueryStress, Query Store, a test database).
- Capture both runs with Extended Events and compare them: the change per metric and percentile, with a warning when the rewrite returns a different number of rows.
Sample data against a synthetic capture of a rewrite: try it with Load sample data, or see the feature tour.
Captured statements often hold sensitive data, so ParamLens keeps everything on your machine: it only
connects to the SQL Server you specify, has no telemetry and makes no other network calls. The .exe
listens on 127.0.0.1 only, with a per-session token; the .html reads the file in the browser and never
uploads it. See SECURITY.md.
Bug reports, parser cases from real captures (anonymized!), translations and code are welcome — see CONTRIBUTING.md. Build and architecture notes are in docs/development.md; changes per version in CHANGELOG.md.
MIT © 2026 Italo Mesquita

