instance method explain

Ruby on Rails 6.0.6

Since v5.2.8.1 Last seen in v6.0.6

Available in: v5.2.8.1 v6.0.6

Signature

explain(arel, binds = [])

No documentation comment.

Parameters

arel req
binds opt = []
Source
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 186
      def explain(arel, binds = [])
        sql     = "EXPLAIN #{to_sql(arel, binds)}"
        start   = Concurrent.monotonic_time
        result  = exec_query(sql, "EXPLAIN", binds)
        elapsed = Concurrent.monotonic_time - start

        MySQL::ExplainPrettyPrinter.new.pp(result, elapsed)
      end

Defined in activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb line 186 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter

Type at least 2 characters to search.

↑↓ navigate · open · esc close