Skip to content
Search
DSL · Pg query

sql_to_explain

Definition

/**
 * Transform a SQL query into an EXPLAIN query.
 *
 * Returns the modified SQL with EXPLAIN wrapped around it.
 * Defaults to EXPLAIN ANALYZE with JSON format for easy parsing.
 *
 * @param string $sql The SQL query to explain
 * @param null|ExplainConfig $config EXPLAIN configuration (defaults to forAnalysis())
 *
 * @return string The EXPLAIN query
 */
sql_to_explain(string $sql, ?ExplainConfig $config) : string

Contributors

Built in the open.

Join us on GitHub
scroll back to top