MMD Solutions SQL Query Optimisation Toolkit

Solutions Hub documentation · Developer tools

SQL Query Optimisation Toolkit guide.

Turn a SQL review into a clear, evidence-led action list.

Open SQL Query Optimisation Toolkit

One clear goal

Produce an evidence-led SQL review, with actionable next steps and official references. This offline toolkit never executes SQL or connects to a database.

Start and review

  1. Extract the purchase ZIP and open index.html in a current Chrome, Edge, Firefox or Safari. Keep the accompanying files together.
  2. Paste SQL or load the fictional example. Choose Review SQL.
  3. Read each prompt, its line number, explanation and next step. The eight checks cover wildcard projections, DISTINCT, nullable NOT IN, leading wildcard searches, deep numeric OFFSET, random ordering, predicate functions and outer UPDATE/DELETE without WHERE.
  4. Optionally paste an existing PostgreSQL JSON plan and review again. Nodes with actual rows show an estimate comparison; differences of at least 10× and zero/nonzero mismatches are marked for review. Rows are per invocation; loops are shown separately.
  5. Download JSON for a structured record or Markdown for a review document. Exports include findings and plan comparisons, not the original SQL text.

Worked example

The supplied query produces seven prompts. Its sample plan estimates 10 rows and reports 1,250 actual rows: a 125× difference. This is a reason to investigate statistics and predicates, not proof of an index requirement or a promised speed improvement.

SQL review of a fictional orders query

Supported scope and limits

Maximum SQL length 250,000 characters; PostgreSQL plan JSON 1,000,000 characters, 2,000 nodes and 100 nested levels. The scanner handles common comments, escaped SQL quotes, quoted identifiers and PostgreSQL dollar strings. It is a heuristic reviewer, not a complete SQL parser or dialect validator. Vendor-specific procedural SQL, backslash escapes, dynamically generated SQL and unusual syntax may produce missed or irrelevant prompts. Review every result.

Only PostgreSQL JSON plans are supported. Estimated-only plans do not have actual counts to compare. No schema, indexes, statistics, row values, timing benchmark or database credentials are inspected. No findings does not establish correctness, safety or optimal performance. Index additions can increase write cost.

Measure safely

Compare results and representative execution plans before and after any change. EXPLAIN ANALYZE actually executes SQL, including side effects. Collect plans in an appropriate environment using your database procedures; this product does not execute or automate that step.

Official references: PostgreSQL EXPLAIN, NOT IN and NULL, SQL Server index design, PostgreSQL LIMIT and OFFSET, index types.

Privacy, purchase and support

Processing is local, without uploads, analytics, accounts or saved browser data. External reference links open only when clicked. £29 once includes version 1.0.0, editable source, examples, tests, this guide, an internal-business-use licence and 90 days of installation support. Future versions and bespoke optimisation work are not promised. Support: support@mmd-solutions.co.uk.

Download and purchase

This is a one-off downloadable product. Gumroad delivers the files through your receipt or Library. No Hub account or subscription is required. Keep the extracted folder together and follow the steps above.