Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.82 KB

File metadata and controls

56 lines (38 loc) · 1.82 KB

Methodology and limits

Three evidence classes

1. Estimated browser plan

Generated from SQL structure and user-entered table statistics. It is useful for teaching and hypothesis formation. It does not reproduce a specific engine's optimizer.

2. Imported engine plan

Generated by a database such as PostgreSQL and imported as JSON. Actual timing and row data appear only when the source plan contains them.

3. AI explanation

Generated through an optional external model under the visitor's own credentials. It is interpretation, not execution evidence.

Cost model

The current model uses transparent heuristics based on:

  • estimated table row counts;
  • declared indexed columns;
  • number and shape of filter predicates;
  • join-condition presence;
  • aggregation, sorting, offset, and limit stages.

The cost values are relative educational units. They are designed to make changes visible, not to predict milliseconds.

Rule checks

The initial detector includes checks for:

  • SELECT *;
  • missing join conditions and Cartesian products;
  • functions on filtered columns;
  • leading-wildcard searches;
  • random ordering;
  • deep OFFSET pagination;
  • NOT IN NULL semantics;
  • DISTINCT and UNION deduplication;
  • OR predicates;
  • possible correlated subqueries;
  • unbounded exploratory result sets;
  • undeclared join-key indexes.

Every rule should be treated as context-dependent. A rule firing is an invitation to measure, not proof that the query is wrong.

Validation strategy

Research releases should compare browser estimates with real plans across controlled datasets. Recommended measurements include:

  • cardinality-estimation error;
  • ranking agreement for alternative plans;
  • false-positive and false-negative rates for findings;
  • user comprehension before and after visualization;
  • stability across data distributions.