EXPLAIN and EXPLAIN ANALYZE display detailed execution plans, letting you inspect cost, row estimates, runtimes, and index usage for ParadeDB-backed queries.
Execution plans uncover slow joins, missing indexes, and mis-estimated cardinality so you can optimize queries before they hurt production latency.
Run EXPL
AI
N
for estimates or EXPLAIN ANALYZE
for real runtimes. ParadeDB injects its own operator names (e.g., ParadeScan
) so you know which parts run inside the extension.
Focus on cost
(planner estimate), rows
, loops
, actual time
, and ParadeDB-specific "gpu_time"
when GPU acceleration is enabled. Large gaps between estimated and actual rows signal statistics issues.
Sort the JSON plan: SELECT jsonb_path_query(plan,'$[*] ? (@."Actual Total Time" > 10)')
. Anything above your SLA time threshold needs attention.
ParadeScan
(GPU scan), ParadeJoin
(GPU hash join), and ParadeAggregate
appear in place of standard Seq Scan, Hash Join, and Aggregate. Treat them similarly when reasoning about cost and rows.
Add BUFFERS
to surface shared-hit vs. read-blocks, crucial for IO tuning. Use SETTINGS
to log per-session parameters that affected the plan.
Wrap the command in EXPLAIN (FORMAT JSON)
and share the output inside a Galaxy Collection so teammates can comment and endorse fixes.
1) Always start with EXPLAIN ANALYZE
in staging. 2) Compare JSON plans between ParadeDB on/off to measure GPU benefit. 3) Keep statistics current with ANALYZE
. 4) Benchmark one change at a time.
Set SET enable_parade_seqscan = off;
before EXPLAIN
to ensure the planner considers ParadeDB index scans, then revert the setting.
Look for Workers Planned
and Workers Launched
. ParadeDB cooperates with PostgreSQL parallel workers; skewed worker utilization implies data skew.
Regularly inspecting ParadeDB execution plans shortens optimization cycles and maximizes GPU acceleration benefits.
Yes. It executes the query fully, so avoid it on large production tables during peak hours. Limit rows or use a replica instead.
Run EXPLAIN (FORMAT JSON)
, copy the result into Galaxy, and add it to a Collection for peer review and endorsement.
Outdated statistics or highly skewed data mislead the planner. Run ANALYZE
or increase default_statistics_target
.