Skip to content
Code Recycle

Component · for humans & their agents

Index Usability Verdict

verified · first-partyactively maintained$0 during beta (was $69)

You added the index. The query is still slow, and the stats say the index has never been used. It was never ELIGIBLE for that predicate — and nothing errors.

by ringbuffer · Code Recycle admin

Get it free — beta

Every claim on this page is refundable if it is untrue — refund policy.

Verified: 165 tests

You added the index. The query is still slow. `pg_stat_user_indexes` -- or `sys.dm_db_index_usage_stats`, or MySQL's `sys.schema_unused_indexes` -- says the index HAS NEVER BEEN USED.

You added the index. The query is still slow. `pg_stat_user_indexes` -- or `sys.dm_db_index_usage_stats`, or MySQL's `sys.schema_unused_indexes` -- says the index HAS NEVER BEEN USED.

The obvious read is "the index didn't help", so someone drops it, or adds a second one beside it, or gives up and adds a cache. ALL THREE MISS THE ACTUAL BUG: the index was never ELIGIBLE for this predicate in the first place. The query is correct. The index exists. The two structurally cannot meet, for one of a short and well documented set of reasons -- and none of them throw an error or show up in a lint pass. The plan quietly picks a scan instead of a seek, forever, and nothing about that is loud.

THIS IS A TRUTH TABLE OVER THAT GAP. You hand it the column's type and collation, the index's definition, and the shape of one predicate -- facts you already have from `information_schema`, `pg_index`, `SHOW CREATE TABLE` or `sys.indexes`, or from simply reading the query -- and it tells you whether they can meet, and if not, which documented reason applies.

The reasons are things like a function applied to the indexed column, a collation mismatch between column and index, an implicit type coercion on one side of the comparison, a leading-column gap in a composite index, and a LIKE pattern that is not left-anchored. Each is ordinary code that reviews cleanly.

IT REFUSES rather than guesses when a fact it needs is absent, naming the fact -- because the assumption that saves time is "the types probably match", and a silent coercion is the most common cause.

VERIFIED: 165 tests, measured by running the suite.

DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.

Interface

What you call, and what comes back. Types and signatures only — the implementation ships with the source.

  export function normalizeText(input: string): string;
  export function expressionsMatch(a: string, b: string): boolean;
  export function tryParseSimpleInequality(rawText: string): SimpleInequality | undefined;
  export function simpleInequalityImplies( indexPredicate: string, queryClause: string, ): boolean;
  export function evaluateIndexUsability(input: IndexUsabilityInput): IndexUsabilityResult;
  export type Dialect = "postgres" | "mysql" | "sqlserver";
  export type IndexMethod = "btree" | "hash" | "gin" | "gist" | "other";
  export type Verdict = "USABLE" | "NOT_USABLE" | "NOT_DETERMINABLE";

01Capabilities

Does

  • + Data engineering
  • + Reliability
  • + Query planning and index eligibility

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

typescript

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

0 open · 0 answered · 0 fixed · 1 said it worked

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 29 source file(s) plus listing text
  • capability contract All 4 observed capability reference(s) match the declared manifest (4 declared as cited source(s), not contacted)
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
1.0.0stableAug 6, 2026First public release.