ProfileResult
A typed view over the `extra` metadata of a **profiled** query run (a query executed with the `profile` option). Combines the per-phase timings, the execution {@see ExecutionStats}, and any optimizer warnings.
Unlike ExplainResult — which analyses a query without running it — a
ProfileResult reflects a query that did run, so its timings and stats are
real measurements.
Tags
Table of Contents
Properties
- $extra : array<string|int, mixed>
Methods
- __construct() : mixed
- plan() : array<string, mixed>
- The execution plan attached to the profiled run, if any.
- raw() : array<string, mixed>
- The raw, unmodified `extra` payload.
- stats() : ExecutionStats
- The typed execution statistics (scanned, filtered, time, memory, …).
- timings() : array<string, float>
- The per-phase timings of the run, in seconds, keyed by phase name (`parsing`, `optimizing plan`, `executing`, `finalizing`, …).
- totalTime() : float
- The sum of all per-phase timings, in seconds — a single "how long did it take".
- warnings() : array<int, mixed>
- The optimizer warnings raised during the run.
Properties
$extra
public
array<string|int, mixed>
$extra
Methods
__construct()
public
__construct(array<string, mixed> $extra) : mixed
Parameters
- $extra : array<string, mixed>
-
The cursor's
getExtra()payload (stats,warnings,profile,plan).
plan()
The execution plan attached to the profiled run, if any.
public
plan() : array<string, mixed>
Return values
array<string, mixed>raw()
The raw, unmodified `extra` payload.
public
raw() : array<string, mixed>
Return values
array<string, mixed>stats()
The typed execution statistics (scanned, filtered, time, memory, …).
public
stats() : ExecutionStats
Return values
ExecutionStatstimings()
The per-phase timings of the run, in seconds, keyed by phase name (`parsing`, `optimizing plan`, `executing`, `finalizing`, …).
public
timings() : array<string, float>
Return values
array<string, float>totalTime()
The sum of all per-phase timings, in seconds — a single "how long did it take".
public
totalTime() : float
Return values
floatwarnings()
The optimizer warnings raised during the run.
public
warnings() : array<int, mixed>