instance method
explain
Ruby on Rails edge
Since v4.2.11.3Signature
explain(arel_or_sql, binds = [], options = [])
No documentation comment.
Parameters
-
arel_or_sqlreq -
bindsopt = [] -
optionsopt = []
Source
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 7
def explain(arel_or_sql, binds = [], options = [])
sql, binds = to_sql_and_binds(arel_or_sql, binds)
sql = build_explain_clause(options) + " " + sql
result = select_all(sql, "EXPLAIN", binds)
PostgreSQL::ExplainPrettyPrinter.new.pp(result)
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb line 7
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements