Method: ActiveRecord::ConnectionAdapters::SQLite3Adapter::ExplainPrettyPrinter#pp
- Defined in:
- lib/active_record/connection_adapters/sqlite3_adapter.rb
#pp(result) ⇒ Object
Pretty prints the result of a EXPLAIN QUERY PLAN in a way that resembles the output of the SQLite shell:
0|0|0|SEARCH TABLE users USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)
0|1|1|SCAN TABLE posts (~100000 rows)
281 282 283 284 285 |
# File 'lib/active_record/connection_adapters/sqlite3_adapter.rb', line 281 def pp(result) # :nodoc: result.rows.map do |row| row.join('|') end.join("\n") + "\n" end |