Flowdock
method

pp

Importance_2
v4.2.9 - Show latest stable - 0 notes - Class: ExplainPrettyPrinter
pp(result, elapsed) public

Pretty prints the result of a EXPLAIN in a way that resembles the output of the MySQL shell:

+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+
| id | select_type | table | type  | possible_keys | key     | key_len | ref   | rows | Extra       |
+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+
|  1 | SIMPLE      | users | const | PRIMARY       | PRIMARY | 4       | const |    1 |             |
|  1 | SIMPLE      | posts | ALL   | NULL          | NULL    | NULL    | NULL  |    1 | Using where |
+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+
2 rows in set (0.00 sec)

This is an exercise in Ruby hyperrealism :).

Show source
Register or log in to add new notes.