aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_record_querying.textile
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-11-08 21:35:17 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-11-08 21:35:17 +0530
commitcff1d751d09e8586f47ae25416085e05ade4f7cd (patch)
tree5d01aacbc5f7b26fbcf8b3e0dca228114fcb9743 /railties/guides/source/active_record_querying.textile
parent34f61f8b1ddf24e3dcc45b10536fff8eb46b3063 (diff)
parent1ffd5ec91069167043c8ecd0d949098f566d88eb (diff)
downloadrails-cff1d751d09e8586f47ae25416085e05ade4f7cd.tar.gz
rails-cff1d751d09e8586f47ae25416085e05ade4f7cd.tar.bz2
rails-cff1d751d09e8586f47ae25416085e05ade4f7cd.zip
Merge branch 'master' of github.com:lifo/docrails
Conflicts: railties/guides/source/active_record_querying.textile
Diffstat (limited to 'railties/guides/source/active_record_querying.textile')
-rw-r--r--railties/guides/source/active_record_querying.textile20
1 files changed, 10 insertions, 10 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile
index ad623ae434..ad12dca7e8 100644
--- a/railties/guides/source/active_record_querying.textile
+++ b/railties/guides/source/active_record_querying.textile
@@ -1287,19 +1287,19 @@ User.where(:id => 1).joins(:posts).explain
may yield
<plain>
-+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+
+<plus>----<plus>-------------<plus>-------<plus>-------<plus>---------------<plus>---------<plus>---------<plus>-------<plus>------<plus>-------------<plus>
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
-+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+
+<plus>----<plus>-------------<plus>-------<plus>-------<plus>---------------<plus>---------<plus>---------<plus>-------<plus>------<plus>-------------<plus>
| 1 | SIMPLE | users | const | PRIMARY | PRIMARY | 4 | const | 1 | |
| 1 | SIMPLE | posts | ALL | NULL | NULL | NULL | NULL | 1 | Using where |
-+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------------+
+<plus>----<plus>-------------<plus>-------<plus>-------<plus>---------------<plus>---------<plus>---------<plus>-------<plus>------<plus>-------------<plus>
2 rows in set (0.00 sec)
</plain>
under MySQL.
Active Record performs a pretty printing that emulates the one of the database
-shells. So, the same query running with the PostreSQL adapter would yield instead
+shells. So, the same query running with the PostgreSQL adapter would yield instead
<plain>
QUERY PLAN
@@ -1324,17 +1324,17 @@ User.where(:id => 1).includes(:posts).explain
yields
<plain>
-+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------+
+<plus>----<plus>-------------<plus>-------<plus>-------<plus>---------------<plus>---------<plus>---------<plus>-------<plus>------<plus>-------<plus>
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
-+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------+
+<plus>----<plus>-------------<plus>-------<plus>-------<plus>---------------<plus>---------<plus>---------<plus>-------<plus>------<plus>-------<plus>
| 1 | SIMPLE | users | const | PRIMARY | PRIMARY | 4 | const | 1 | |
-+----+-------------+-------+-------+---------------+---------+---------+-------+------+-------+
+<plus>----<plus>-------------<plus>-------<plus>-------<plus>---------------<plus>---------<plus>---------<plus>-------<plus>------<plus>-------<plus>
1 row in set (0.00 sec)
-+----+-------------+-------+------+---------------+------+---------+------+------+-------------+
+<plus>----<plus>-------------<plus>-------<plus>------<plus>---------------<plus>------<plus>---------<plus>------<plus>------<plus>-------------<plus>
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
-+----+-------------+-------+------+---------------+------+---------+------+------+-------------+
+<plus>----<plus>-------------<plus>-------<plus>------<plus>---------------<plus>------<plus>---------<plus>------<plus>------<plus>-------------<plus>
| 1 | SIMPLE | posts | ALL | NULL | NULL | NULL | NULL | 1 | Using where |
-+----+-------------+-------+------+---------------+------+---------+------+------+-------------+
+<plus>----<plus>-------------<plus>-------<plus>------<plus>---------------<plus>------<plus>---------<plus>------<plus>------<plus>-------------<plus>
1 row in set (0.00 sec)
</plain>